]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb)
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 8 Dec 2014 16:42:12 +0000 (17:42 +0100)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:24:50 +0000 (15:24 +0000)
Unfortunately, the attribute present bits for MP_REACH and MP_UNREACH
which 1a211cb ("bgpd: one more fix"...) tests for are never set in their
corresponding attribute parsing functions.

Reported-by: Martin Winter <mwinter@netdef.org>
Fixes: 1a211cb "bgpd: one more fix for tightening of check for missing well-known attributes"
Cc: Paul Jakma <paul@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit daefeb8755e194dd19a5f1910bc78d13c8147efb)

bgpd/bgp_attr.c

index 366b105f228726e9b744eedf12d3d92fe273487a..214aa095f11ff2f30dc973b545fc1028c6fa39d8 100644 (file)
@@ -1664,6 +1664,8 @@ bgp_mp_reach_parse (struct bgp_attr_parser_args *args,
 
   stream_forward_getp (s, nlri_len);
 
+  attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_MP_REACH_NLRI);
+
   return BGP_ATTR_PARSE_PROCEED;
 #undef LEN_LEFT
 }
@@ -1680,6 +1682,7 @@ bgp_mp_unreach_parse (struct bgp_attr_parser_args *args,
   int ret;
   int num_mp_pfx = 0;
   struct peer *const peer = args->peer;  
+  struct attr *const attr = args->attr;
   const bgp_size_t length = args->length;
 
   s = peer->ibuf;
@@ -1708,6 +1711,8 @@ bgp_mp_unreach_parse (struct bgp_attr_parser_args *args,
 
   stream_forward_getp (s, withdraw_len);
 
+  attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_MP_UNREACH_NLRI);
+
   return BGP_ATTR_PARSE_PROCEED;
 }