Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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.h: change value of BGP_SAFI_VPNV6 to 128 (RFC4659, BZ#659)
* bgp_route.c: (bgp_table_stats_vty) fix length argument to strncmp()
|
|
|
|
* 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.
|
|
"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
|
|
|
|
* 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)
|
|
* 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)
|
|
(cherry picked from commit e6844aa5d23cf56dd1f31afc96e8145ab188953f)
|
|
...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/bgp_debug.c: fix VTY strings for BGP debug commands to match
correct syntax
(cherry picked from commit 6e22b9017e1ae2ce61c383b1b2b63973207704ac)
|
|
* 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)
|
|
* 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)
|
|
* bgp_vty.c: (community_list_perror, show_ip_community_list_arg,
show_ip_extcommunity_list_arg) fix spelling
(cherry picked from commit b729294c8c5c6f2af8ddf6cfbea2374b6faabe9d)
|
|
|
|
|
|
"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
|
|
* zebra_routemap.c: (route_set_src) get rid of the dummy family variable.
|
|
* bgp_aspath.c: (assegments_parse) just bail early if length doesn't match
and fix the formatting.
* bgp_network.c: add include needed for set_nonblocking
* bgp_packet.c: formatting
|
|
* ospf_apiserver.{c,h}: (ospf_apiserver_lsa_refresher) refreshers must now
return the refreshed LSA.
* ospf_te.{c,h}: (ospf_mpls_te_lsa_refresh) ditto
* ospf_api.c: trivial compiler warning fix
|
|
|
|
* ospf6_zebra.c: (ospf6_zebra_if_state_update) zebra_interface_state_read
may return NULL, if it can't find an interface, deal with it.
|
|
* ospf6_zebra.c: (ospf6_zebra_if_state_update) zebra_interface_state_read
may return NULL, if it can't find an interface, deal with it.
|
|
* bgp_routemap.c: (route_set_community_delete) When deleting a
community in a route-map the old community was being orphaned. Like
the description of the same code in route_set_community, this is a
hack, not a true fix.
|
|
This reverts commit 2c9fd7e07283b8904ef20030c9dadb032e999b12.
|
|
* doc/Makefile.am: pdf target needs to depend on all the input files.
|
|
|
|
* bgp_attr.c: (attrhash_key_make) 98e30f should have changed jhash2 to jhash.
These kinds of merge errors would be reduced and life would be easier if
people would submit fully-formed fixes that could be chucked directly into
git-am.
|
|
* bgpd.h: Add error code for setting GTSM on iBGP
* bgpd.c: (peer_ttl_security_hops_set) use previous error code and signal
incompatibility of GTSM+iBGP to vty.
Consider the session state when setting GTSM, and reset Open/Active peers
to let them pick up new TTL from start.
|
|
In deciding whether to default ospfapi to on or off, use the same rule
for opaque-lsa as earlier: != no rather than = yes, so that not having
set it implies yes.
|
|
* sockunion.c: (sockopt_minttl) Add IPv6 support for min hop count.
The kernel support is Linux kernel 2.6.35 or later.
|
|
* bgp_vty.c: (peer_ebgp_multihop_{un,}set_vty) tail-call cleanup.
({no_,}neighbor_ttl_security) ditto.
* bgpd.c: (peer_ttl_security_hops_set) Peer group checks and TTL set only
need to be done on transition.
* sockunion.c: (sockopt_minttl) remove always-on debug and improve readability.
|
|
* bgpd: Add support for RFC 5082 GTSM, which allows the TTL field to be used
to verify that incoming packets have been sent from neighbours no more
than X IP hops away. In other words, this allows packets that were sent from
further away (i.e. not by the neighbour with known distance, and so possibly
a miscreant) to be filtered out.
* lib/sockunion.{c,h}: (sockopt_minttl) new function, to set a minimum TTL
using the IP_MINTTL socket opt.
* bgpd.h: (BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK) define for command
error for minttl.
(struct peer) add a config variable, to store the configured minttl.
(peer_ttl_security_hops_{set,unset}) configuration handlers
* bgpd.c: (peer_group_get) init gtsm_hops
(peer_ebgp_multihop_{un,}set) check for conflicts with GTSM. Multihop and
GTSM can't both be active for a peer at the same time.
(peer_ttl_security_hops_set) set minttl, taking care to avoid conflicts with
ebgp_multihop.
(bgp_config_write_peer) write out minttl as "neighbor .. ttl-security hops X".
* bgp_vty.c: (bgp_vty_return) message for
BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK
(peer_ebgp_multihop_{un,}set_vty)
* bgp_network.c: (bgp_accept) set minttl on accepted sockets if appropriate.
(bgp_connect) ditto for outbound.
|
|
|
|
* 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
|
|
The following patch was also neccessary to compile.
* command.c: (config_logmsg_cmd) use "%s" format spec
* if.c: (connected_log) ditto
|
|
* bgp_attr.c; (attrhash_key_make) s6_addr is only member of in6_addr
guaranteed to be available - s6_addr32 isn't. Fix to be more portable, and
thus allow compilation on BSD again.
|
|
* ospfd: Refresher logic cleanup broke OSPF opaque, which does its own thing
with regard to refresher logic and which also, in the protocol, requires
implementations to keep state of which OI an LSA is received on (rather
than providing information in the LSA to allow it to be looked up - as
other LSAs requiring such assocation were careful to do).
* ospf_lsa.h: (struct ospf_interface) Add back the pointer to oi, but only
for type-9 now.
* ospf_nsm.c: (ospf_db_summary_add) check the oi actually exists first -
doesn't obviate the need for opaque to ensure oi pointers get cleaned up
when ospf_interfaces disappear.
* ospf_opaque.{c,h}: (ospf_opaque_functab,ospf_opaque_lsa_refresh) Refresher
LSA functions now need to return the LSA to the general refresh logic,
to indicate whether the LSA was refreshed.
|
|
* configure.ac: (AC_ARG_ENABLE({ospf-te,opaque-lsa})) reverse the sense to
--disable
(enable_{opaque_lsa,ospf_te}) treat as enabled unless explicitly disabled.
|
|
* bgp_packet.c: (bgp_write) On BGP write, use TCP_CORK to provide hints to
kernel about TCP buffering. This will cause BGP packets to occur in
bigger chunks (full size MTU), improving performance and getting rid of
one of the problems reported in the UNH BGP conformance test.
|
|
* sockunion.{c,h}: (sockopt_cork) wrapper for TCP_CORK socket option for
those platforms that provide it. For other platforms, it is just a nop.
|
|
* bgpd: Rather than toggling socket in/out of non-block mode, just leave it
in nonblocking mode.
One exception is in bgp_notify which only happens just before close.
|
|
* bgp_community.[ch]: (community_lookup) New helper function to look
up a community list in the hash table.
* bgp_routemap.c: A new community structure was being allocated for
every BGP update which matched a route map which set a community.
This behavior led to rapid growth in the memory consumed by bgpd.
Adding the communities to the hash table addresses the memory
growth, but may introduce a problem in modifying or deleting the
'set community' statement in the route map.
|
|
Many show commands do not have support for multiple views and do not
treat different address families uniformly. The following changes add
a number of commands with support for views and rationalized treatment
of IPv4 v IPv6 and unicast v multicast (such as in JUNOS, IOS XR and
more recent versions of IOS).
* bgp_route.c: (bgp_show_community) Inserted a new second argument (the
name of the view) and the code to look up that name in the BGP structure.
The NULL argument in the call to bgp_show (indicating the default view)
was replaced by the specified view. The existing calls to
bgp_show_community had a NULL second argument inserted to make clear
that they refer to the default view.
(top level) Added new functions via the DEFUN and/or ALIAS macros (and
the associated command table entries) to add the commands
show bgp ipv4 (unicast|multicast)
show bgp ipv4 (unicast|multicast) A.B.C.D
show bgp ipv4 (unicast|multicast) A.B.C.D/M
show bgp ipv6 (unicast|multicast)
show bgp ipv6 (unicast|multicast) X:X::X:X
show bgp ipv6 (unicast|multicast) X:X::X:X/M
These show either the full BGP table or the specified route or
prefix for the given address family.
show bgp view WORD (ipv4|ipv6) (unicast|multicast) community
show bgp view WORD (ipv4|ipv6) (unicast|multicast) community \
(AA:NN|local-AS|no-advertise|no-export){1,4}
For the specified view and address family, these show entries
matching any community or the specified communit(y)(ies).
show bgp view WORD (ipv4|ipv6) (unicast|multicast) neighbors \
(A.B.C.D|X:X::X:X) (advertised-routes|received-routes)
For the specified view and address family, show the routes
advertised to or received from the given BGP neighbor.
show bgp [view WORD] ipv4 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X)
show bgp [view WORD] ipv4 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X) A.B.C.D
show bgp [view WORD] ipv4 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X) A.B.C.D/M
show bgp [view WORD] ipv6 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X)
show bgp [view WORD] ipv6 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X) X:X::X:X
show bgp [view WORD] ipv6 (unicast|multicast) \
rsclient (A.B.C.D|X:X::X:X) X:X::X:X/M
For the specifed (optional) view and address family, show either
the full BGP table or the specified route or prefix for the given
route server client peer.
* bgp_vty.c: (top level) Added new functions via the DEFUN and/or ALIAS
macros (and the associated command table entries) to add the commands
show bgp [view WORD] (ipv4|ipv6) (unicast|multicast) summary
show bgp [view WORD] (ipv4|ipv6) (unicast|multicast) rsclient summary
For the specified (optional) view and address family, display
either the normal summary table for BGP peers, or the route server
client table showing the import and export policies.
|
|
* configure.ac: Bump to 0.99.18
|
|
* BGP error handling generally boils down to "reset session". This was fine
when all BGP speakers pretty much understood all BGP messages. However
the increasing deployment of new attribute types has shown this approach
to cause problems, in particular where a new attribute type is "tunneled"
over some speakers which do not understand it, and then arrives at a speaker
which does but considers it malformed (e.g. corruption along the way, or
because of early implementation bugs/interop issues).
To mitigate this drafts before the IDR (likely to be adopted) propose to
treat errors in partial (i.e. not understood by neighbour), optional
transitive attributes, when received from eBGP peers, as withdrawing only
the NLRIs in the affected UPDATE, rather than causing the entire session
to be reset. See:
http://tools.ietf.org/html/draft-scudder-idr-optional-transitive
* bgp_aspath.c: (assegments_parse) Replace the "NULL means valid, 0-length
OR an error" return value with an error code - instead taking
pointer to result structure as arg.
(aspath_parse) adjust to suit previous change, but here NULL really
does mean error in the external interface.
* bgp_attr.h (bgp_attr_parse) use an explictly typed and enumerated
value to indicate return result.
(bgp_attr_unintern_sub) cleans up just the members of an attr, but not the
attr itself, for benefit of those who use a stack-local attr.
* bgp_attr.c: (bgp_attr_unintern_sub) split out from bgp_attr_unintern
(bgp_attr_unintern) as previous.
(bgp_attr_malformed) helper function to centralise decisions on how to
handle errors in attributes.
(bgp_attr_{aspathlimit,origin,etc..}) Use bgp_attr_malformed.
(bgp_attr_aspathlimit) Subcode for error specifc to this attr should be
BGP_NOTIFY_UPDATE_OPT_ATTR_ERR.
(bgp_attr_as4_path) be more rigorous about checks, ala bgp_attr_as_path.
(bgp_attr_parse) Adjust to deal with the additional error level that
bgp_attr_ parsers can raise, and also similarly return appropriate
error back up to (bgp_update_receive). Try to avoid leaking as4_path.
* bgp_packet.c: (bgp_update_receive) Adjust to deal with BGP_ATTR_PARSE_WITHDRAW
error level from bgp_attr_parse, which should lead to a withdraw, by
making the attribute parameter in call to (bgp_nlri_parse) conditional
on the error, so the update case morphs also into a withdraw.
Use bgp_attr_unintern_sub from above, instead of doing this itself.
Fix error case returns which were not calling bgp_attr_unintern_sub
and probably leaking memory.
* tests/aspath_test.c: Fix to work for null return with bad segments
|
|
* 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.
|