summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | bgpd: Fix compile failure if IPv6 build was disabled.Paul Jakma2011-07-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | * bgp_route.c: ({no_,}ipv6_bgp_network_ttl_cmd) depends on ipv6_bgp_network which is HAVE_IPV6, so these should be too. (bgp_route_init) and the installs should be similarly ifdefed
| | * | bgpd: rename SAFI 3 according to RFC4760Denis Ovsienko2011-07-174-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - SAFI value 3 is reserved. It was assigned by RFC 2858 for a use that was never fully implemented, so it is deprecated by this document. * zebra.h: rename macro * bgp_fsm.c: (bgp_graceful_restart_timer_expire, bgp_graceful_stale_timer_expire, bgp_stop, bgp_establish): update * bgpd.c: (peer_nsf_stop): update * bgp_open.c: (bgp_capability_vty_out): SAFI 3 isn't a recognized case any more
| | * | configure: fix OpenPAM detectionDenis Ovsienko2011-07-151-1/+8
| | | |
| | * | configure: fix FreeBSD header detection (BZ#408)Denis Ovsienko2011-07-141-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is based on Xavier Beaudouin's patch (which fixes detection of 3 config.h macros on FreeBSD without any impact to Linux build of Quagga) and FreeBSD port patch (which fixes 5 config.h macros, but breaks the Linux build), it fixes 5 macros and works for both FreeBSD 8 and Linux.
| | * | bgpd: more SAFI fixesDenis Ovsienko2011-07-147-60/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two macros resolving to the same integer constant broke a case block and a more thorough merge of BGP_SAFI_VPNV4 and BGP_SAFI_VPNV6 was performed. * bgpd.h: MPLS-labeled VPN SAFI is AFI-independent, switch to single * macro * bgp_capability_test.c: update test data * bgp_mp_attr_test.c: idem * bgp_route.c: (bgp_maximum_prefix_overflow, bgp_table_stats_vty) update macro and check conditions (where appropriate) * bgp_packet.c: (bgp_route_refresh_send, bgp_capability_send, bgp_update_receive, bgp_route_refresh_receive): idem * bgp_open.c: (bgp_capability_vty_out, bgp_afi_safi_valid_indices, bgp_open_capability_orf, bgp_open_capability): idem * bgp_attr.c: (bgp_mp_reach_parse, bgp_packet_attribute, bgp_packet_withdraw): idem
| | * | bgpd: fix SAFI for for MPLS labeled VPN-IPv6Denis Ovsienko2011-07-132-2/+2
| | | | | | | | | | | | | | | | | | | | * bgpd.h: change value of BGP_SAFI_VPNV6 to 128 (RFC4659, BZ#659) * bgp_route.c: (bgp_table_stats_vty) fix length argument to strncmp()
| | * | bgpd: consistent log msg format (BZ#565)heasley2011-07-121-5/+5
| | | |
| | * | ospf6d: check MTU with message header size in mindDmitrij Tejblum2011-07-121-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf6_message.c: (ospf6_packet_max): new function, return maximum IPv6 payload on an interface; (ospf6_hello_send, ospf6_dbdesc_send, ospf6_dbdesc_send_newone, ospf6_lsreq_send, ospf6_lsupdate_send_neighbor, ospf6_lsupdate_send_interface, ospf6_lsack_send_neighbor, ospf6_lsack_send_interface): compare message size with the maximum payload instead of the MTU.
| | * | ospf6d: copy "mtu-ignore" option from ospfdDmitrij Tejblum2011-07-123-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "mtu-ignore" is an option ospfd used to mimic from the vendor's implementation, now ospf6d will also implement it. * ospf6_interface.h: extend ospf6_interface structure by one flag * ospf6_interface.c: (ipv6_ospf6_mtu_ignore, no_ipv6_ospf6_mtu_ignore): new declarations; (ospf6_interface_create): show initial value for consistency; (ospf6_interface_show): print flag status * ospf6_message.c: (ospf6_dbdesc_recv): consider interface-specific flag when checking MTU
| | * | version RE-0.99.17.1RE-0.99.17.1Denis Ovsienko2011-07-121-1/+1
| | | |
| | * | bgpd: Remove AS Path limit/TTL functionalityPaul Jakma2011-07-057-600/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * draft-ietf-idr-as-pathlimit doesn't seem to have gone anywhere, and its author does not think it will make progress in IDR. Remove all support introduced for it, but leave stubs for the commands to avoid breaking any configurations. Basically reverts cecab5e9725792e60a5e4b473e238a14cd85815d. (cherry picked from commit c8f3fe3063cb9ff193b13011cfbda3e605395340) Conflicts: bgpd/bgp_attr.c (caused by c8e7b895, resolved)
| | * | bgpd/security: CVE-2010-1674 Fix crash due to extended-community parser errorPaul Jakma2011-07-041-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_attr.c: (bgp_attr_ext_communities) Certain extended-community attrs can leave attr->flag indicating ext-community is present, even though no extended-community object has been attached to the attr structure. Thus a null-pointer dereference can occur later. (bgp_attr_community) No bug fixed here, but tidy up flow so it has same form as previous. Problem and fix thanks to anonymous reporter. (cherry picked from commit 0c46638122f10019a12ae9668aec91691cf2e017)
| | * | doc: fix "ipv6 address" interface command syntax (#608)Denis Ovsienko2011-07-041-2/+2
| | | | | | | | | | | | | | | | (cherry picked from commit e6844aa5d23cf56dd1f31afc96e8145ab188953f)
| | * | ripd: resolve debug statements issue (bug 442)Andrew J. Schorr2011-07-042-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...A nasty bug, if you forgot to disable debugging, stored the config and reboot your machine - if you really depend on ripd, then the machine will not fully come back on the network, because ripd fails. (cherry picked from commit 0fa0335316ce14a79ea4bbb0c40e1322c9941dd3)
| | * | bgpd: VTY string fixes for debug commandsDavid Ward2011-07-041-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | * bgpd/bgp_debug.c: fix VTY strings for BGP debug commands to match correct syntax (cherry picked from commit 6e22b9017e1ae2ce61c383b1b2b63973207704ac)
| | * | bgpd: fix handling of "Unsupported Capability"Dmitrij Tejblum2011-07-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_packet.c: (bgp_notify_receive) justify the difference between BGP_NOTIFY_OPEN_UNSUP_PARAM and BGP_NOTIFY_OPEN_UNSUP_CAPBL cases, as it is explained in RFC5492, page 3, paragraph 1. "Unsupported Capability" error does not mean, that the peer doesn't support capabilities advertisement -- quite the opposite (if the peer would not support capabilities advertisement, the code would be "Unsupported Optional Parameter"). Thus there is no reason to mark the peer as one non-supporting capabilities advertisement. Example: suppose the peer is in fact IPv6-only, but we didn't configure anything address-family specific for it. Then, the peer would refuse the session with "Unsupported Capability" code. If we internally set the peer as non-supporting capabilities advertisement after that, we will not be able to establish the session with it ever, even with a fixed configuration -- IPv6-only BGP session cannot be established without capabilities. In practice an edge case would be seen as the same IPv6 peer working with its "neighbor" block read from bgpd.conf, but not working, when slowly input in "conf t" mode. (cherry picked from commit c7aa8abd8788c3607ad0131f02e892cf92221e40)
| | * | ospf6d: fix crash in SPF calculationDmitrij Tejblum2011-07-041-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf6_spf.c: Don't replace a node with another node with a lower number of hops, instead get them from the queue in the correct order. (Actually, the replacement crashed the ospf6d daemon rather than worked.) (cherry picked from commit 403138e189c24f6867824c4eeb668d11564e1ca0)
| | * | bgpd: fix community-list error message spellingDenis Ovsienko2011-07-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * bgp_vty.c: (community_list_perror, show_ip_community_list_arg, show_ip_extcommunity_list_arg) fix spelling (cherry picked from commit b729294c8c5c6f2af8ddf6cfbea2374b6faabe9d)
| * | | bgpd: Fix incorrect attribute type code in call to bgp_attr_malformedPaul Jakma2012-01-081-2/+2
| | | |
| * | | bgpd: Improve flag error messages in bgp_attr_aspathPaul Jakma2012-01-081-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgpd/bgp_attr.c: (bgp_attr_aspath) error message could be misleading, clearly log what flag was incorrect. (Problem noted in "bgpd: fix error message in bgp_attr_aspath()" in Quagga-RE)
| * | | lib: use prefix bit length macrosDenis Ovsienko2012-01-081-7/+7
| | | |
| * | | ospfd: use IS_LSA_SELF() where appropriateDenis Ovsienko2012-01-081-6/+7
| | | |
| * | | bgpd: rewrite attr flag error loggingDenis Ovsienko2012-01-081-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bgp_attr.c * attr_flag_str: new message list * bgp_attr_flags_diagnose(): new function, implements previously added error logging in a generic way * bgp_attr_origin(): use bgp_attr_flags_diagnose() * bgp_attr_nexthop(): ditto * bgp_attr_med(): ditto * bgp_attr_local_pref(): ditto * bgp_attr_atomic(): ditto * bgp_attr_originator_id(): ditto * bgp_attr_cluster_list(): ditto * bgp_mp_reach_parse(): ditto * bgp_mp_unreach_parse(): ditto
| * | | doc: "[no] router zebra" does not belong to ospfdDenis Ovsienko2012-01-081-4/+0
| | | |
| * | | ospfd: justify ospf_default_originate_timer()Denis Ovsienko2012-01-082-2/+1
| | | | | | | | | | | | | | | | | | | | The function is implemented in ospf_lsa.c, move its "extern" declaration to ospf_lsa.h for consistency.
| * | | ospfd: address more trivial compiler warningsDenis Ovsienko2012-01-081-1/+0
| | | | | | | | | | | | | | | | | | | | * ospf_ase.c * ospf_ase_complete_direct_routes(): dismiss unused variable
| * | | ospf6d: ospf6_lsa_cmd_init() does not existDenis Ovsienko2012-01-081-1/+0
| | | |
| * | | bgpd: improve "show ip bgp scan detail"Denis Ovsienko2012-01-081-2/+22
| | | | | | | | | | | | | | | | | | | | * bgp_nexthop.c (show_ip_bgp_scan_tables): access proper structure field in AF_INET6 case, handle ifindex NH type properly
| * | | bgpd: dismiss some zlookup checksDenis Ovsienko2012-01-081-32/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | bgp_nexthop_onlink(): zlookup is not used here at all bgp_nexthop_lookup_ipv6(): rely on the detection performed by "query" function (this also changes the fallback value to 0), reorder if-block bgp_nexthop_lookup(): idem
| * | | bgpd: add "show ip bgp scan detail" commandDenis Ovsienko2012-01-081-15/+44
| | | | | | | | | | | | | | | | | | | | | | | | * bgp_nexthop.c: (show_ip_bgp_scan) transform into show_ip_bgp_scan_tables(), which uses inet_ntop() and can dump nexthops on request; (show_ip_bgp_scan_detail_cmd) new function
| * | | bgpd: touch nexthop handling codeDenis Ovsienko2012-01-083-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bgp_nexthop_lookup_ipv6(): declare variables where they are actually used, drop no-op initialization (the field is already 0) bgp_nexthop_lookup(): ditto bgp_nexthop_check_ebgp(): rename to bgp_nexthop_onlink() bgp_nexthop_cache_changed(): rename to bgp_nexthop_cache_different()
| * | | lib/if: trivial, fix rarely used if debug function to print everythingPaul Jakma2012-01-061-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | * if.c: (if_dump) loop that doesn't do anything, wants to be before the zlog of what it's meant to print out so all the connected addresses get printed out. Trival: just a debug function
| * | | general: remove inline qualifiers and move in-header functions to objectsPaul Jakma2012-01-069-28/+31
| | | | | | | | | | | | | | | | | | | | | | | | * (general) Move functions in headers into files, to be compiled into shared object files. Remove inline qualifier from functions. Let the compiler do the work.
| * | | doc: update BGP RFC referencesDenis Ovsienko2012-01-021-16/+14
| | | |
| * | | zebra: fix IPv6 RA wrt interface removal (BZ#480)Denis Ovsienko2012-01-021-1/+1
| | | |
| * | | zebra: fix ifindex test condition (BZ#487)Matthias Ferdinand2012-01-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the same ip address is used on several interfaces, and one of them gets deleted (or equivalent: set to down and then address removed), rib_delete_ipv[46] will also remove the connected route from other interfaces. rib_delete_ipv[46] is called twice when an interface is deleted: - for the "ifdown" event - for the address removal (note: this may be specific to the netlink interface of linux) The second call does not find the connected route to that same ifindex anymore, but deletes similar connected routes to any other ifindex instead. Reason: the ifindex check is on the same level as the check for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. If everything matches except for the ifindex, the "else" part (intended for different route types) is executed, thus removing the route from the wrong interface. fix: move ifindex check inside the "then" part of the check for ZEBRA_ROUTE_CONNECT/NEXTHOP_TYPE_IFINDEX. Now connected routes to other ifindexes will not spill over to the "else" part for different route types anymore.
| * | | ospf6d: fix compiler warning messagesVyacheslav Trushkin2012-01-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix disagreement with C99 in zlog_debug calls Format specifier in some zlog_debug calls for size_t values was changed in order to C99 ('%u' -> '%zu'). * fix -Wsign-compare warnings Type of return value of ospf6_packet_max() was changed.
| * | | lib: fix some strtoul() use casesUlrich Weber2012-01-024-10/+26
| | | | | | | | | | | | | | | | ...otherwise 4294967295 is not a valid value on 32bit systems
| * | | ospf6d: add verifying user's privilegesVyacheslav Trushkin2012-01-021-0/+7
| | | |
| * | | ospfd: fix bug in NSSA ABR status checkDenis Ovsienko2012-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf_abr.c * ospf_abr_nssa_am_elected(): feed "best" instead of "address of best" into IPV4_ADDR_CMP(), because "best" is a pointer; also, mean s_addr field of the structures to get better typed pointers
| * | | lib: address type-punned pointers in prefix_same()Denis Ovsienko2012-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | IPV4_ADDR_SAME() wasn't passed the right union member, this could cause a bug due to strict-aliasing. IPV6_ADDR_SAME() case got its fix before the error could be created by macro upgrade.
| * | | bgpd: justify checks for IPv4 class D/EDenis Ovsienko2012-01-023-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/prefix.h * IPV4_CLASS_DE(): make consistent with counterpart macros * bgp_packet.c * bgp_open_receive(): test using macro instead of ">=" * bgp_route.c * bgp_update_rsclient(): idem * bgp_update_main(): idem
| * | | ospfd: fix packet reception for FreeBSD 10.Dmitrij Tejblum2012-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ospf_packet.c (ospf_recv_packet): FreeBSD, starting from version 10, will not subtract the IP header size from ip_len. This is the patch from FreeBSD's ports/net/quagga/files/patch-ospfd__ospf_packet.c, by Boris Kovalenko.
| * | | zebra: ZEBRA_HELLO and mopping up routes (BZ#448)Vyacheslav Trushkin2012-01-025-2/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZEBRA_HELLO message is used by routing daemons to inform zebra what type of routes daemon will be announcing to zebra. Also zebra uses route_type_oaths array to track which daemon announces which protocol. Zebra mops up routes if daemon didn't for some reason.
| * | | lib: fix type-punning in ip_masklen()Denis Ovsienko2012-01-021-2/+7
| | | | | | | | | | | | | | | | | | | | ip_masklen() was likely to return incorrect results after being compiled with -fstrict-aliasing (-O2, -O3, -Os)
| * | | lib: optimize ip_masklen()Denis Ovsienko2012-01-021-25/+2076
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new implementation makes use of a 64KB mapping table, which makes it possible to compute masklen faster and with constant execution time. The map also allows for additional version of the function, which can detect errors in input argument. The previous implementation had a variable cost of execution, which depended on masklen in a non-linear manner, and at its worst (/31) was 4 times slower, than the new implementation. The only case of old function just slightly outperforming the new one is /0, which is of little practical interest.
| * | | Revert "lib: optimize apply_mask_ipv6()"Denis Ovsienko2012-01-011-7/+17
| | | | | | | | | | | | | | | | | | | | Experience with IPv4 counterpart of this function suggests, that this way of type-punning is likely to cause errors.
| * | | ospfd: more info in LSA checksum warning (BZ#685)Jaroslav Fojtik2011-12-211-2/+7
| | | |
| * | | fix set never used warningsStephen Hemminger2011-12-1810-58/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This patch was modified to leave calls to stream_getl() in place, they are necessary for the stream's internal pointer to advance to the correct position. -- Denis) Signed-off-by: Denis Ovsienko <infrastation@yandex.ru> Fix gcc warnings about varables that are set but never used. * bgpd/bgp_attr.c * cluster_unintern(): ret * transit_unintern(): ret * bgp_attr_default_intern(): attre * bgp_mp_reach_parse(): rd_high, rd_low * bgpd/bgp_route.c * bgp_announce_check_rsclient(): bgp * bgpd/bgp_zebra.c * zebra_read_ipv4(): ifindex * zebra_read_ipv6(): ifindex * bgpd/bgpd.c * bgp_config_write_peer(): filter * lib/distribute.c * distribute_list_all(): dist * distribute_list(): dist * distribute_list_prefix_all(): dist * distribute_list_prefix(): dist * lib/if_rmap.c * if_rmap(): if_rmap * lib/vty.c * vty_accept(): vty * lib/zclient.c * zclient_read(): ret * zebra/irdp_interface.c * if_group(): zi * zebra/rt_netlink.c * kernel_read(): ret, sock
| * | | ospf6d: always remove the result of a previous SPF calculationTom Goff2011-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to avoid stale routes in some cases; the regression was introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c. * ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish() before possibly returning if no router-LSA is found for the root of the SPF tree.