bgpd: Ignore RFC8212 for BGP Confederations

RFC 8212 should be restricted for eBGP peers.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit fa2cc09d45)
This commit is contained in:
Donatas Abraitis 2024-06-27 22:46:58 +03:00 committed by Mergify
parent dd53197ef2
commit 8eb7d0ac1a

View File

@ -6342,7 +6342,8 @@ void bgp_set_stale_route(struct peer *peer, afi_t afi, safi_t safi)
bool bgp_outbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
{
if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD)
if (peer->sort == BGP_PEER_CONFED || peer->sort == BGP_PEER_IBGP ||
peer->sub_sort == BGP_PEER_EBGP_OAD)
return true;
if (peer->sort == BGP_PEER_EBGP &&
@ -6355,7 +6356,8 @@ bool bgp_outbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
bool bgp_inbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
{
if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD)
if (peer->sort == BGP_PEER_CONFED || peer->sort == BGP_PEER_IBGP ||
peer->sub_sort == BGP_PEER_EBGP_OAD)
return true;
if (peer->sort == BGP_PEER_EBGP