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 <christopher.dziomba@telekom.de>
This commit is contained in:
Christopher Dziomba 2025-04-26 20:10:37 +02:00
parent 083893dfbb
commit ec06de8403
No known key found for this signature in database

View 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);
}
}