diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-07-07 14:07:11 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-07-07 22:02:18 +0200 |
commit | 29196a6a5f3f0d882796d56d48f2971cb57a47d4 (patch) | |
tree | 56f29a060ad790d1f0a818b2b43fc39e77c623ab /bgpd/bgp_attr.c | |
parent | bgpd: Check if originator-id attribute is not received via eBGP session (diff) | |
download | frr-29196a6a5f3f0d882796d56d48f2971cb57a47d4.tar.xz frr-29196a6a5f3f0d882796d56d48f2971cb57a47d4.zip |
bgpd: Check if cluster list attribute is not received via eBGP session
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r-- | bgpd/bgp_attr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index b5cdcfd2d..63705fb15 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -2183,6 +2183,15 @@ bgp_attr_cluster_list(struct bgp_attr_parser_args *args) struct attr *const attr = args->attr; const bgp_size_t length = args->length; + /* if the CLUSTER_LIST attribute is received from an external + * neighbor, it SHALL be discarded using the approach of "attribute + * discard". + */ + if (peer->sort == BGP_PEER_EBGP) { + stream_forward_getp(peer->curr, length); + return BGP_ATTR_PARSE_PROCEED; + } + /* if received from an internal neighbor, it SHALL be considered * malformed if its length is not a non-zero multiple of 4. If * malformed, the UPDATE message SHALL be handled using the approach |