diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2021-09-22 07:19:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-22 07:19:31 -0400 |
| commit | 2b7da4cb3115b44c19b1943d8004fa9d95525f77 (patch) | |
| tree | 43baa42f4e966b64b975715c5e7bea8d4b655a07 | |
| parent | d24f4b7d84e3c1937a3edc87ed00ecfb3dd8e784 (diff) | |
| parent | cd18af00c8608f887b6532b6cb73b97843166e4a (diff) | |
Merge pull request #9651 from proelbtn/refactor-9638
bgpd: fix mpls nexthop announce in bgp_zebra_announce
| -rw-r--r-- | bgpd/bgp_zebra.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index e8ca544c23..dc48629e1d 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1219,7 +1219,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, struct zapi_nexthop *api_nh; int nh_family; unsigned int valid_nh_count = 0; - int has_valid_label = 0; bool allow_recursion = false; int has_valid_sid = 0; uint8_t distance; @@ -1434,7 +1433,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, if (mpinfo->extra && bgp_is_valid_label(&mpinfo->extra->label[0]) && !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) { - has_valid_label = 1; label = label_pton(&mpinfo->extra->label[0]); SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_LABEL); @@ -1560,7 +1558,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, label_buf[0] = '\0'; eth_buf[0] = '\0'; segs_buf[0] = '\0'; - if (has_valid_label + if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_LABEL) && !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) snprintf(label_buf, sizeof(label_buf), "label %u", api_nh->labels[0]); |
