mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
bgpd: do not send label to zebra route add for evpn routes
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
parent
30a30f5727
commit
a89b49cc4e
@ -1139,8 +1139,8 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
|||||||
api_nh->type = NEXTHOP_TYPE_IPV6_IFINDEX;
|
api_nh->type = NEXTHOP_TYPE_IPV6_IFINDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mpinfo->extra
|
if (mpinfo->extra && bgp_is_valid_label(&mpinfo->extra->label)
|
||||||
&& bgp_is_valid_label(&mpinfo->extra->label)) {
|
&& !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_TYPE2_ROUTE)) {
|
||||||
has_valid_label = 1;
|
has_valid_label = 1;
|
||||||
label = label_pton(&mpinfo->extra->label);
|
label = label_pton(&mpinfo->extra->label);
|
||||||
|
|
||||||
@ -1150,7 +1150,9 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
|||||||
valid_nh_count++;
|
valid_nh_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_valid_label)
|
/* if this is a evpn route we don't have to include the label */
|
||||||
|
if (has_valid_label &&
|
||||||
|
!(CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_TYPE2_ROUTE)))
|
||||||
SET_FLAG(api.message, ZAPI_MESSAGE_LABEL);
|
SET_FLAG(api.message, ZAPI_MESSAGE_LABEL);
|
||||||
|
|
||||||
if (info->sub_type != BGP_ROUTE_AGGREGATE)
|
if (info->sub_type != BGP_ROUTE_AGGREGATE)
|
||||||
@ -1192,7 +1194,8 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
|||||||
sizeof(nh_buf));
|
sizeof(nh_buf));
|
||||||
|
|
||||||
label_buf[0] = '\0';
|
label_buf[0] = '\0';
|
||||||
if (has_valid_label)
|
if (has_valid_label &&
|
||||||
|
!CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_TYPE2_ROUTE))
|
||||||
sprintf(label_buf, "label %u",
|
sprintf(label_buf, "label %u",
|
||||||
api_nh->labels[0]);
|
api_nh->labels[0]);
|
||||||
zlog_debug(" nhop [%d]: %s %s", i + 1, nh_buf,
|
zlog_debug(" nhop [%d]: %s %s", i + 1, nh_buf,
|
||||||
|
Loading…
Reference in New Issue
Block a user