diff options
author | Russ White <russ@riw.us> | 2023-09-19 16:16:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 16:16:33 +0200 |
commit | fd8b00ed53fd596165cf71c8f9a93e373ed095b5 (patch) | |
tree | 604e160816b6532e327c3f777cfb435d19d3db7e /bgpd | |
parent | Merge pull request #14398 from m-varasteh/ospfd-rfc5709 (diff) | |
parent | tests: Check if private ASNs are removed if modified by route-map (diff) | |
download | frr-fd8b00ed53fd596165cf71c8f9a93e373ed095b5.tar.xz frr-fd8b00ed53fd596165cf71c8f9a93e373ed095b5.zip |
Merge pull request #14420 from opensourcerouting/fix/remove_private_asn_after_route_map
bgpd: Remove private ASNs after we modify the as-path with the route-map
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_route.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 227a68ee5..df3397af9 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2378,9 +2378,6 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi, bgp_otc_egress(peer, attr)) return false; - bgp_peer_remove_private_as(bgp, afi, safi, peer, attr); - bgp_peer_as_override(bgp, afi, safi, peer, attr); - if (filter->advmap.update_type == UPDATE_TYPE_WITHDRAW && filter->advmap.aname && route_map_lookup_by_name(filter->advmap.aname)) { @@ -2453,6 +2450,9 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi, } } + bgp_peer_remove_private_as(bgp, afi, safi, peer, attr); + bgp_peer_as_override(bgp, afi, safi, peer, attr); + /* RFC 8212 to prevent route leaks. * This specification intends to improve this situation by requiring the * explicit configuration of both BGP Import and Export Policies for any |