summaryrefslogtreecommitdiff
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index b367b393d9..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);
@@ -1451,11 +1449,10 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
api_nh->weight = nh_weight;
- if (mpinfo->extra
- && !sid_zero(&mpinfo->extra->sid[0])
+ if (mpinfo->extra && !sid_zero(&mpinfo->extra->sid[0].sid)
&& !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) {
has_valid_sid = 1;
- memcpy(&api_nh->seg6_segs, &mpinfo->extra->sid[0],
+ memcpy(&api_nh->seg6_segs, &mpinfo->extra->sid[0].sid,
sizeof(api_nh->seg6_segs));
}
@@ -1561,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]);