]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: use nexthop instead of route vrf_id for EVPN
authorChristopher Dziomba <christopher.dziomba@telekom.de>
Sat, 26 Apr 2025 18:10:37 +0000 (20:10 +0200)
committerChristopher Dziomba <christopher.dziomba@telekom.de>
Sat, 26 Apr 2025 18:10:37 +0000 (20:10 +0200)
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 <christopher.dziomba@telekom.de>
zebra/zebra_rib.c

index 77e3eb9e4626eb84ed49478bfd69beffdc8e30ca..84cb8c7a4cf6c4b77a68aa0d6aa226b54d4647d4 100644 (file)
@@ -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);
                        }
                }