From: Donatas Abraitis Date: Mon, 24 Jun 2024 17:16:16 +0000 (+0300) Subject: bgpd: Relax OAD (One-Administration-Domain) for RFC8212 X-Git-Tag: base_10.2~318^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F16273%2Fhead;p=mirror%2Ffrr.git bgpd: Relax OAD (One-Administration-Domain) for RFC8212 RFC 8212 defines leak prevention for eBGP peers, but BGP-OAD defines a new peering type One Administrative Domain (OAD), where multiple ASNs could be used inside a single administrative domain. OAD allows sending non-transitive attributes, so this prevention should be relaxed too. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 4dcb22234a..9c3602311f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6333,7 +6333,7 @@ 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) + if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD) return true; if (peer->sort == BGP_PEER_EBGP && @@ -6346,7 +6346,7 @@ 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) + if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD) return true; if (peer->sort == BGP_PEER_EBGP