summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2023-08-22 22:40:12 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2024-04-23 14:25:48 +0200
commit03d2ad01a4fd4aa6df4b1ec64249fb391405a61f (patch)
tree8392342d90260a79bbd819ff47fc8106e6c0502c /lib
parentMerge pull request #15815 from donaldsharp/blackhole_reinstall (diff)
downloadfrr-03d2ad01a4fd4aa6df4b1ec64249fb391405a61f.tar.xz
frr-03d2ad01a4fd4aa6df4b1ec64249fb391405a61f.zip
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/zclient.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 4cbd04c11..645df1cb2 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: