mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 20:22:36 +00:00
bgpd: Allow filtering PMSI Tunnel 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
f390253ca7
commit
f0bb2626ef
@ -3369,6 +3369,9 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
|
|||||||
uint8_t tnl_type;
|
uint8_t tnl_type;
|
||||||
int attr_parse_len = 2 + BGP_LABEL_BYTES;
|
int attr_parse_len = 2 + BGP_LABEL_BYTES;
|
||||||
|
|
||||||
|
if (peer->discard_attrs[args->type] || peer->withdraw_attrs[args->type])
|
||||||
|
goto pmsi_tunnel_ignore;
|
||||||
|
|
||||||
/* Verify that the receiver is expecting "ingress replication" as we
|
/* Verify that the receiver is expecting "ingress replication" as we
|
||||||
* can only support that.
|
* can only support that.
|
||||||
*/
|
*/
|
||||||
@ -3405,6 +3408,11 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
|
|||||||
stream_forward_getp(peer->curr, length - attr_parse_len);
|
stream_forward_getp(peer->curr, length - attr_parse_len);
|
||||||
|
|
||||||
return BGP_ATTR_PARSE_PROCEED;
|
return BGP_ATTR_PARSE_PROCEED;
|
||||||
|
|
||||||
|
pmsi_tunnel_ignore:
|
||||||
|
stream_forward_getp(peer->curr, length);
|
||||||
|
|
||||||
|
return bgp_attr_ignore(peer, args->type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AIGP attribute (rfc7311) */
|
/* AIGP attribute (rfc7311) */
|
||||||
|
Loading…
Reference in New Issue
Block a user