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>
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 5e213db..be316da 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -1591,6 +1591,8 @@
stream_forward_getp (s, nlri_len);
+ attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_MP_REACH_NLRI);
+
return BGP_ATTR_PARSE_PROCEED;
#undef LEN_LEFT
}
@@ -1606,6 +1608,7 @@
u_int16_t withdraw_len;
int ret;
struct peer *const peer = args->peer;
+ struct attr *const attr = args->attr;
const bgp_size_t length = args->length;
s = peer->ibuf;
@@ -1633,6 +1636,8 @@
stream_forward_getp (s, withdraw_len);
+ attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_MP_UNREACH_NLRI);
+
return BGP_ATTR_PARSE_PROCEED;
}