summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2023-03-11 12:05:37 +0100
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>2023-09-11 22:11:30 +0200
commit66c50ce22ab2239081c04abf5a565955b6b8c216 (patch)
tree1d609a3fd22a94d1a854d1b5756bdcb8da018b74 /isisd
parentisisd: Pack Sub-Sub-TLVs of SRv6 End SID Sub-TLV (diff)
downloadfrr-66c50ce22ab2239081c04abf5a565955b6b8c216.tar.xz
frr-66c50ce22ab2239081c04abf5a565955b6b8c216.zip
isisd: Unpack Sub-Sub-TLVs of SRv6 End SID Sub-TLV
Extend SRv6 End SID Sub-TLV unpack function to unpack Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_tlvs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c
index 2a17d79ef..a9cc7e1c6 100644
--- a/isisd/isis_tlvs.c
+++ b/isisd/isis_tlvs.c
@@ -2275,6 +2275,20 @@ static int unpack_item_srv6_end_sid(uint16_t mtid, uint8_t len,
goto out;
}
+ sid->subsubtlvs =
+ isis_alloc_subsubtlvs(ISIS_CONTEXT_SUBSUBTLV_SRV6_END_SID);
+
+ bool unpacked_known_tlvs = false;
+ if (unpack_tlvs(ISIS_CONTEXT_SUBSUBTLV_SRV6_END_SID, subsubtlv_len, s,
+ log, sid->subsubtlvs, indent + 4,
+ &unpacked_known_tlvs)) {
+ goto out;
+ }
+ if (!unpacked_known_tlvs) {
+ isis_free_subsubtlvs(sid->subsubtlvs);
+ sid->subsubtlvs = NULL;
+ }
+
append_item(&subtlvs->srv6_end_sids, (struct isis_item *)sid);
return 0;
out: