]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix evpn attributes being dropped on input
authorTuetuopay <tuetuopay@me.com>
Mon, 17 Mar 2025 14:08:15 +0000 (15:08 +0100)
committerTuetuopay <tuetuopay@me.com>
Thu, 20 Mar 2025 09:23:17 +0000 (10:23 +0100)
All assignments of the EVPN attributes (ESI and Gateway IP) are gated
behind the peer being set up for inbound soft-reconfiguration.

There are no actual reasons for this limitation, so let's perform the
EVPN attribute assignment no matter what when soft reconfiguration is
not enabled.

Fixes: 6e076ba5231 ("bgpd: Fix for ain->attr corruption during path update")
Signed-off-by: Tuetuopay <tuetuopay@me.com>
bgpd/bgp_route.c
tests/topotests/bgp_evpn_route_map_set/r2/frr.conf

index a7825165e7e8ffde28f0d341b004e19867c1b7d1..8676eb04a3cee952202ca16ae3ff27d0d99fad42 100644 (file)
@@ -5165,7 +5165,8 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
         * attr->evpn_overlay with evpn directly. Instead memcpy
         * evpn to new_atr.evpn_overlay before it is interned.
         */
-       if (soft_reconfig && evpn && afi == AFI_L2VPN) {
+       if (evpn && afi == AFI_L2VPN &&
+           (soft_reconfig || !CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_SOFT_RECONFIG))) {
                bgp_attr_set_evpn_overlay(&new_attr, evpn);
                p_evpn = NULL;
        }
index 754b696bfdf571ef3c43ef5bc67f6826c829e9c7..2a15998420d48ff4628c31be0d9fb7c804792c2a 100644 (file)
@@ -12,9 +12,6 @@ router bgp 64000
  !
  address-family l2vpn evpn
   neighbor 10.0.0.2 activate
-  ! workaround for now, as frr drops some evpn attributes like gw-ip if soft
-  ! reconf is not enabled for inbound routes
-  neighbor 10.0.0.2 soft-reconfiguration inbound
   !
   advertise-all-vni
  exit-address-family