Skip to content

Commit 451ef28

Browse files
committed
isisd: Pack SRv6 Capabilities Sub-TLV
Extend Router Capabilities TLV pack function to pack Router Capabilies Sub-TLV (RFC 9352 section sonic-net#2). Signed-off-by: Carmine Scarpitta <[email protected]>
1 parent 0457d8f commit 451ef28

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

isisd/isis_tlvs.c

+7
Original file line numberDiff line numberDiff line change
@@ -4366,6 +4366,13 @@ static int pack_tlv_router_cap(const struct isis_router_cap *router_cap,
43664366
}
43674367
#endif /* ifndef FABRICD */
43684368

4369+
/* Add SRv6 capabilities if set as per RFC 9352 section #2 */
4370+
if (router_cap->srv6_cap.is_srv6_capable) {
4371+
stream_putc(s, ISIS_SUBTLV_SRV6_CAPABILITIES);
4372+
stream_putc(s, ISIS_SUBTLV_SRV6_CAPABILITIES_SIZE);
4373+
stream_putw(s, router_cap->srv6_cap.flags);
4374+
}
4375+
43694376
/* Adjust TLV length which depends on subTLVs presence */
43704377
tlv_len = stream_get_endp(s) - len_pos - 1;
43714378
stream_putc_at(s, len_pos, tlv_len);

0 commit comments

Comments
 (0)