summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@opensourcerouting.org>2014-09-23 15:23:01 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2016-05-26 20:13:10 +0000
commitbb7bef1490138c464ffe5f065a5f3755fc6e1b6f (patch)
treed656cf422fe28272a6c48bea83c3fb7816318ccd /zebra/zebra_rib.c
parent4799375a87f028c057613753d056434d1fe1856d (diff)
bgpd: well-known attr check only run for v4/uni, which could cause a crash.
* ANVL testing by Martin Winter threw up a crash in bgpd in aspath_dup called from bgp_packet_attribute, if attr->aspath was NULL, on an IPv6 UPDATE. This root cause is that the checks for well-known, mandatory attributes were being applied only if an UPDATE contained the IPv4 NLRI and the peer was configured for v4/unicast (i.e. not deconfigured). This is something inherited from GNU Zebra, and never noticed before. * bgp_attr.c: (bgp_attr_parse) Move the well-known mandatory attribute check to here, so that it can be run immediately after all attributes are parsed, and before any further processing of attributes that might assume the existence of WK/M attributes (e.g. AS4-Path). (bgp_attr_munge_as4_attrs) Missing AS_PATH shouldn't happen here anymore, but retain a check anyway for robustness - it's definitely a hard error though. * bgp_attr.h: (bgp_attr_check) No longer needs to be exported, make static. * bgp_packet.c: (bgp_update_receive) Responsibility for well-known check now in bgp_attr_parse. (cherry picked from commit 055086f70febc30fdfd94bb4406e9075d6934cd8) Conflicts: bgpd/bgp_attr.c bgpd/bgp_attr.h bgpd/bgp_packet.c
Diffstat (limited to 'zebra/zebra_rib.c')
0 files changed, 0 insertions, 0 deletions