mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
BGP: Fix unknown attribute handling
This commit is contained in:
@@ -701,7 +701,8 @@ bgp_format_mpls_label_stack(eattr *a, byte *buf, uint size)
|
||||
static inline void
|
||||
bgp_decode_unknown(struct bgp_parse_state *s, uint code, uint flags, byte *data, uint len, ea_list **to)
|
||||
{
|
||||
bgp_set_attr_data(to, s->pool, code, flags, data, len);
|
||||
/* Cannot use bgp_set_attr_data() as it works on known attributes only */
|
||||
ea_set_attr_data(to, s->pool, EA_CODE(EAP_BGP, code), flags, EAF_TYPE_OPAQUE, data, len);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2284,6 +2284,8 @@ bgp_rx_update(struct bgp_conn *conn, byte *pkt, uint len)
|
||||
|
||||
if (s.attr_len)
|
||||
ea = bgp_decode_attrs(&s, s.attrs, s.attr_len);
|
||||
else
|
||||
ea = NULL;
|
||||
|
||||
/* Check for End-of-RIB marker */
|
||||
if (!s.attr_len && !s.ip_unreach_len && !s.ip_reach_len)
|
||||
|
Reference in New Issue
Block a user