Skip to content

Commit 03d2ad0

Browse files
committed
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: 9b7491e ("lib: Add support for flags to the SRv6 locator") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
1 parent a4e60f3 commit 03d2ad0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/zclient.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ int zapi_srv6_locator_encode(struct stream *s, const struct srv6_locator *l)
11251125
stream_put(s, l->name, strlen(l->name));
11261126
stream_putw(s, l->prefix.prefixlen);
11271127
stream_put(s, &l->prefix.prefix, sizeof(l->prefix.prefix));
1128+
stream_putc(s, l->flags);
11281129
return 0;
11291130
}
11301131

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

11451147
stream_failure:

0 commit comments

Comments
 (0)