Skip to content

Commit

Permalink
isisd: Pack SRv6 End SID when packing Sub-TLVs
Browse files Browse the repository at this point in the history
Extend generic Sub-TLVs pack function to pack SRv6 End SID Sub-TLVs
(RFC 9352 section sonic-net#7.2).

Signed-off-by: Carmine Scarpitta <[email protected]>
  • Loading branch information
cscarpitta committed Sep 11, 2023
1 parent 47dc349 commit b9547a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions isisd/isis_tlvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,11 @@ static int pack_subtlvs(struct isis_subtlvs *subtlvs, struct stream *s)
if (rv)
return rv;

rv = pack_items(subtlvs->context, ISIS_SUBTLV_SRV6_END_SID,
&subtlvs->srv6_end_sids, s, NULL, NULL, NULL, NULL);
if (rv)
return rv;

size_t subtlv_len = stream_get_endp(s) - subtlv_len_pos - 1;
if (subtlv_len > 255)
return 1;
Expand Down

0 comments on commit b9547a0

Please sign in to comment.