From: Philippe Guibert Date: Fri, 7 Feb 2025 14:40:29 +0000 (+0100) Subject: bgpd: simplify bgp_evpn_process_rt1 with label X-Git-Tag: docker/10.3.0~32^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=50fe9e6e2912473d7878cc5641a67b85607d9741;p=matthieu%2Ffrr.git bgpd: simplify bgp_evpn_process_rt1 with label Remove the num_labels variable, the received bgp_update() and bgp_withdraw() function will read the message as including one label or vni value. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c index b6ec8341a7..d7867bd029 100644 --- a/bgpd/bgp_evpn_mh.c +++ b/bgpd/bgp_evpn_mh.c @@ -1233,12 +1233,11 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi, build_evpn_type1_prefix(&p, eth_tag, &esi, vtep_ip); /* Process the route. */ if (attr) { - bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, - safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, - 0, 0, NULL); + bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, safi, ZEBRA_ROUTE_BGP, + BGP_ROUTE_NORMAL, &prd, &label, 1, 0, NULL); } else { - bgp_withdraw(peer, (struct prefix *)&p, addpath_id, afi, safi, - ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, 0); + bgp_withdraw(peer, (struct prefix *)&p, addpath_id, afi, safi, ZEBRA_ROUTE_BGP, + BGP_ROUTE_NORMAL, &prd, &label, 1); } return 0; }