diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2025-02-07 15:40:29 +0100 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-02-12 21:54:24 +0200 |
| commit | 50fe9e6e2912473d7878cc5641a67b85607d9741 (patch) | |
| tree | 8baf1012361cf944e99da66d497d2f725e6264e0 /bgpd | |
| parent | 45e7fc0bedd01bbe4b784d37a90ef28ac4569f2f (diff) | |
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 <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_evpn_mh.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |
