summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2021-09-24 20:58:12 +0200
committerGitHub <noreply@github.com>2021-09-24 20:58:12 +0200
commit83caa5e5c1e05062977bdd77ede06d63d03c1ddf (patch)
treeaf8e8892d996196c6e0d9a1b2844c47b32e3b8c6
parentMerge pull request #9659 from idryzhov/dev-doc-fix (diff)
parentbgpd: fix annouce for multipath SRv6 SID routes (diff)
downloadfrr-83caa5e5c1e05062977bdd77ede06d63d03c1ddf.tar.xz
frr-83caa5e5c1e05062977bdd77ede06d63d03c1ddf.zip
Merge pull request #9638 from proelbtn/fix-multipath-srv6-sid
-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 dc48629e1..2a67bb2f8 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1220,7 +1220,6 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
int nh_family;
unsigned int valid_nh_count = 0;
bool allow_recursion = false;
- int has_valid_sid = 0;
uint8_t distance;
struct peer *peer;
struct bgp_path_info *mpinfo;
@@ -1451,17 +1450,15 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
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].sid,
sizeof(api_nh->seg6_segs));
+
+ SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_SEG6);
}
valid_nh_count++;
}
- if (has_valid_sid && !(CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)))
- SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_SEG6);
-
is_add = (valid_nh_count || nhg_id) ? true : false;
if (is_add && CHECK_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA)) {
@@ -1562,7 +1559,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
&& !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE))
snprintf(label_buf, sizeof(label_buf),
"label %u", api_nh->labels[0]);
- if (has_valid_sid
+ if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_SEG6)
&& !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)) {
inet_ntop(AF_INET6, &api_nh->seg6_segs,
sid_buf, sizeof(sid_buf));