Skip to content

Commit

Permalink
[FRR]: Bring PR FRRouting/frr#15673 from FRR mainline
Browse files Browse the repository at this point in the history
This commit brings PR FRRouting/frr#15673 from FRR mainline to SONiC

lib: fix srv6 locator flags propagated to isis
FRRouting/frr#15673

Signed-off-by: cscarpitta <cscarpit@cisco.com>
  • Loading branch information
cscarpitta committed Dec 16, 2024
1 parent b6004ec commit 802afb1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 03d2ad01a4fd4aa6df4b1ec64249fb391405a61f Mon Sep 17 00:00:00 2001

From: Philippe Guibert <philippe.guibert@6wind.com>

Subject: [PATCH] lib: fix srv6 locator flags propagated to isis

When usid is not used, the isis_srv6_topo1 test does not work.
The SID prefix allocated by isis is different when the usid
flags is set or not. When the flags is not transmitted to isis,
the SID allocated is supposed to be a 128 bit mask length SID,
which is not what the isis_srv6_topo1 test is supposed to obtain.

Fix this by exchanging the flags locator value in the zclient api.

Fixes: 9b7491e1fc04 ("lib: Add support for flags to the SRv6 locator")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
---
lib/zclient.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/lib/zclient.c b/lib/zclient.c
index 64515c754..269c3e9ba 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1125,6 +1125,7 @@ int zapi_srv6_locator_encode(struct stream *s, const struct srv6_locator *l)
stream_put(s, l->name, strlen(l->name));
stream_putw(s, l->prefix.prefixlen);
stream_put(s, &l->prefix.prefix, sizeof(l->prefix.prefix));
+ stream_putc(s, l->flags);
return 0;
}

@@ -1140,6 +1141,7 @@ int zapi_srv6_locator_decode(struct stream *s, struct srv6_locator *l)
STREAM_GETW(s, l->prefix.prefixlen);
STREAM_GET(&l->prefix.prefix, s, sizeof(l->prefix.prefix));
l->prefix.family = AF_INET6;
+ STREAM_GETC(s, l->flags);
return 0;

stream_failure:
1 change: 1 addition & 0 deletions src/sonic-frr/patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@
0063-Patch-to-send-tag-value-associated-with-route-via-ne.patch
0064-SRv6-BGP-SID-reachability.patch
0065-zebra-display-srv6-encapsulation-source-address-when-configured.patch
0066-lib-fix-srv6-locator-flags-propagated-to-isis.patch

0 comments on commit 802afb1

Please sign in to comment.