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 <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)
This commit is contained in:
David Lamparter 2014-12-08 17:42:12 +01:00 committed by Daniel Walton
parent cfa0ed0949
commit 37da8fa9a2

View 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;
}