From: David Lamparter Date: Mon, 8 Dec 2014 16:42:12 +0000 (+0100) Subject: bgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb) X-Git-Tag: frr-2.0-rc1~775 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=37da8fa9a2b8e69c68241ecbf72a4976e48e8e1f;p=mirror%2Ffrr.git bgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb) 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 Fixes: 1a211cb "bgpd: one more fix for tightening of check for missing well-known attributes" Cc: Paul Jakma Signed-off-by: David Lamparter (cherry picked from commit daefeb8755e194dd19a5f1910bc78d13c8147efb) --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 366b105f22..214aa095f1 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -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; }