Skip to content

Commit

Permalink
Merge pull request FRRouting#16312 from FRRouting/mergify/bp/dev/10.1…
Browse files Browse the repository at this point in the history
…/pr-16305

bgpd: Ignore RFC8212 for BGP Confederations (backport FRRouting#16305)
  • Loading branch information
riw777 authored Jul 2, 2024
2 parents 9221e2c + 57dec1c commit 7da20b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tests/topotests/bgp_confed1/r2/bgpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
!debug bgp updates out
!
router bgp 200
no bgp ebgp-requires-policy
bgp confederation identifier 300
bgp confederation peers 300
neighbor 192.0.2.1 remote-as 100
neighbor 192.0.2.18 remote-as 300
!
address-family ipv4 unicast
network 203.0.113.16/28
neighbor 192.0.2.1 route-map any in
neighbor 192.0.2.1 route-map any out
neighbor 192.0.2.18 default-originate
exit-address-family
!

route-map any permit 10

0 comments on commit 7da20b3

Please sign in to comment.