mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 10:04:18 +00:00
bgpd: Allow filtering Prefix-SID attribute
Filtering this attribute via `path-attribute discard/treat-as-widthraw`. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
05c17eff06
commit
f390253ca7
@ -3300,6 +3300,9 @@ enum bgp_attr_parse_ret bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
|
|||||||
size_t headersz = sizeof(type) + sizeof(length);
|
size_t headersz = sizeof(type) + sizeof(length);
|
||||||
size_t psid_parsed_length = 0;
|
size_t psid_parsed_length = 0;
|
||||||
|
|
||||||
|
if (peer->discard_attrs[args->type] || peer->withdraw_attrs[args->type])
|
||||||
|
goto prefix_sid_ignore;
|
||||||
|
|
||||||
while (STREAM_READABLE(peer->curr) > 0
|
while (STREAM_READABLE(peer->curr) > 0
|
||||||
&& psid_parsed_length < args->length) {
|
&& psid_parsed_length < args->length) {
|
||||||
|
|
||||||
@ -3347,6 +3350,11 @@ enum bgp_attr_parse_ret bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
|
|||||||
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PREFIX_SID));
|
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_PREFIX_SID));
|
||||||
|
|
||||||
return BGP_ATTR_PARSE_PROCEED;
|
return BGP_ATTR_PARSE_PROCEED;
|
||||||
|
|
||||||
|
prefix_sid_ignore:
|
||||||
|
stream_forward_getp(peer->curr, args->length);
|
||||||
|
|
||||||
|
return bgp_attr_ignore(peer, args->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PMSI tunnel attribute (RFC 6514)
|
/* PMSI tunnel attribute (RFC 6514)
|
||||||
|
Loading…
Reference in New Issue
Block a user