From: Christopher Dziomba Date: Sat, 26 Apr 2025 18:10:37 +0000 (+0200) Subject: zebra: use nexthop instead of route vrf_id for EVPN X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ec06de8403f932b13cec1244b8da636f0fc720c9;p=mirror%2Ffrr.git zebra: use nexthop instead of route vrf_id for EVPN Today zebra tracks EVPN vtep_ips in the L3-VNI of the route_entry. Leaking routes in bgpd and using different RMACs on the remote side for different L3-VNIs for a single VTEP leads to updates in the leak destination VRF which is not desired. Zebra gets the source VRF in vrf_id of the nexthops. This nexthop vrf_id is now used for adding/ updating/deleting the l3vni nexthop. Signed-off-by: Christopher Dziomba --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 77e3eb9e46..84cb8c7a4c 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2789,9 +2789,8 @@ static void process_subq_early_route_add(struct zebra_early_route *ere) vtep_ip.ipa_type = IPADDR_V6; vtep_ip.ipaddr_v6 = tmp_nh->gate.ipv6; } - zebra_rib_queue_evpn_route_add( - re->vrf_id, &tmp_nh->rmac, &vtep_ip, - &ere->p); + zebra_rib_queue_evpn_route_add(tmp_nh->vrf_id, &tmp_nh->rmac, + &vtep_ip, &ere->p); } } } @@ -2939,7 +2938,7 @@ static void process_subq_early_route_add(struct zebra_early_route *ere) memcpy(&(vtep_ip.ipaddr_v6), &(tmp_nh->gate.ipv6), sizeof(struct in6_addr)); } - zebra_rib_queue_evpn_route_del(same->vrf_id, &vtep_ip, &ere->p); + zebra_rib_queue_evpn_route_del(tmp_nh->vrf_id, &vtep_ip, &ere->p); } } @@ -3183,8 +3182,7 @@ static void process_subq_early_route_delete(struct zebra_early_route *ere) &(tmp_nh->gate.ipv6), sizeof(struct in6_addr)); } - zebra_rib_queue_evpn_route_del( - re->vrf_id, &vtep_ip, &ere->p); + zebra_rib_queue_evpn_route_del(tmp_nh->vrf_id, &vtep_ip, &ere->p); } }