]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: simplify bgp_evpn_process_rt1 with label
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 7 Feb 2025 14:40:29 +0000 (15:40 +0100)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 12 Feb 2025 19:54:24 +0000 (21:54 +0200)
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 <philippe.guibert@6wind.com>
bgpd/bgp_evpn_mh.c

index b6ec8341a7b1a1322502233374691c90f8381925..d7867bd0299b3be265f59f7783b57232c3eb5205 100644 (file)
@@ -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;
 }