Extend Router Capabilities TLV pack function to pack Router Capabilies
Sub-TLV (RFC 9352 section #2).
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
}
#endif /* ifndef FABRICD */
+ /* Add SRv6 capabilities if set as per RFC 9352 section #2 */
+ if (router_cap->srv6_cap.is_srv6_capable) {
+ stream_putc(s, ISIS_SUBTLV_SRV6_CAPABILITIES);
+ stream_putc(s, ISIS_SUBTLV_SRV6_CAPABILITIES_SIZE);
+ stream_putw(s, router_cap->srv6_cap.flags);
+ }
+
/* Adjust TLV length which depends on subTLVs presence */
tlv_len = stream_get_endp(s) - len_pos - 1;
stream_putc_at(s, len_pos, tlv_len);