]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Relax OAD (One-Administration-Domain) for RFC8212 16273/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 24 Jun 2024 17:16:16 +0000 (20:16 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 24 Jun 2024 17:16:16 +0000 (20:16 +0300)
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 <donatas@opensourcerouting.org>
bgpd/bgp_route.c

index 4dcb22234ac584f10486cfd6cf487fd66748a8e3..9c3602311f77b3e4256fb19e5f82eda205a022ec 100644 (file)
@@ -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