]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Relax OAD (One-Administration-Domain) for RFC8212 16289/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Mon, 24 Jun 2024 17:16:16 +0000 (20:16 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 25 Jun 2024 11:25:33 +0000 (11:25 +0000)
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>
(cherry picked from commit 3b98ddf5018cf7526b50c15018cbaf71a38fa752)

bgpd/bgp_route.c

index 94c21e186150cf5e6e7d6a5173360bc64568dbf0..766b4e0751e2da17bb7233f52489505095088931 100644 (file)
@@ -6342,7 +6342,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 &&
@@ -6355,7 +6355,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