summaryrefslogtreecommitdiffstats
path: root/isisd/isis_tlvs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* isisd: properly display srv6 algorithmDmytro Shytyi2024-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the segment-routing ipv6 is configured, the SPF algoritm shows S-SPF is used: > rt1# show isis segment-routing srv6 node > Area 1: > IS-IS L1 SRv6-Nodes: > > System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D > ----------------------------------------------------------------------------------------- > 0000.0000.0001 S-SPF 3 3 2 5 Actually, the segment-routing ipv6 algo capabilities (SPF) are rewritten. Don't rewrite the algo[0]. > rt1# show isis segment-routing srv6 node > Area 1: > IS-IS L1 SRv6-Nodes: > > System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D > ----------------------------------------------------------------------------------------- > 0000.0000.0001 SPF 3 3 2 5 Fixes: ("78774bbcd51b") isisd: add isis flex-algo lsp advertisement Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
* isisd: Remove deprecated JSON fieldsDonatas Abraitis2024-09-191-771/+26
| | | | Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* isisd: fix rcap tlv double-free crashLouis Scalbert2024-09-161-9/+8
| | | | | | | | | | | | | | | | | | | | | A double-free crash happens when a subTLV of the "Router Capability" TLV is not readable and a previous "Router Capability" TLV was read. rcap was supposed to be freed later by isis_free_tlvs() -> free_tlv_router_cap(). In 78774bbcd5 ("isisd: add isis flex-algo lsp advertisement"), this was not the case because rcap was not saved to tlvs->router_cap when the function returned early because of a subTLV length issue. Always set tlvs->router_cap to free the memory. Note that this patch has the consequence that in case of subTLV error, the previously read "Router Capability" subTLVs are kept in memory. Fixes: 49efc80d34 ("isisd: Ensure rcap is freed in error case") Fixes: 78774bbcd5 ("isisd: add isis flex-algo lsp advertisement") Reported-by: Iggy Frankovic <iggyfran@amazon.com> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix crash when reading aslaLouis Scalbert2024-09-031-2/+11
| | | | | | | | | | | | | isisd is crashing when reading a ASLA sub-TLV with Application Identifier Bit Mask length greater than 1 octet. Set a limit of 8 bytes in accordance with RFC9479 and check that the received value does not exceed the limit. Reported-by: Iggy Frankovic <iggyfran@amazon.com> Link: https://www.rfc-editor.org/rfc/rfc9479.html#name-application-identifier-bit- Fixes: 5749ac83a8 ("isisd: add ASLA support") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix srv6 endx sid key nameLouis Scalbert2024-06-241-1/+2
| | | | | | | srv6EndSID is actually srv6EndXSID. Fixes: d5879267aa ("isisd: fix show database json format") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix neighbor id json keyLouis Scalbert2024-06-241-1/+1
| | | | | | | | d5879267aa ("isisd: fix show database json format") renamed JSON keys to a standard format but forgot to rename the neighbor-id key. Fixes: d5879267aa ("isisd: fix show database json format") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: remane flags_json variableLouis Scalbert2024-06-241-178/+195
| | | | | | | | | The variable flags_json was incorrectly named, leading to confusion and causing the bug fixed in the previous commit. Rename the variable to refer to SRv6 End SID instead. Cosmetic change. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix display crash srv6 sid structure in jsonLouis Scalbert2024-06-211-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a crash when doing "show isis database detail json" in isis_srv6_topo1 topotest. > #0 raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50 > #1 0x00007fad89524e2c in core_handler (signo=6, siginfo=0x7ffe86a4b8b0, context=0x7ffe86a4b780) at lib/sigevent.c:258 > #2 <signal handler called> > #3 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 > #4 0x00007fad8904e537 in __GI_abort () at abort.c:79 > #5 0x00007fad8904e40f in __assert_fail_base (fmt=0x7fad891c5688 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fad8a3e70e8 "json_object_get_type(jso) == json_type_object", > file=0x7fad8a3e7064 "./json_object.c", line=590, function=<optimized out>) at assert.c:92 > #6 0x00007fad8905d662 in __GI___assert_fail (assertion=0x7fad8a3e70e8 "json_object_get_type(jso) == json_type_object", file=0x7fad8a3e7064 "./json_object.c", line=590, > function=0x7fad8a3e7440 "json_object_object_add_ex") at assert.c:101 > #7 0x00007fad8a3dfe93 in json_object_object_add_ex () from /lib/x86_64-linux-gnu/libjson-c.so.5 > #8 0x000055708e3f8f7f in format_subsubtlv_srv6_sid_structure (sid_struct=0x602000172b70, buf=0x0, json=0x6040000a21d0, indent=6) at isisd/isis_tlvs.c:2880 > #9 0x000055708e3f9acb in isis_format_subsubtlvs (subsubtlvs=0x602000172b50, buf=0x0, json=0x6040000a21d0, indent=6) at isisd/isis_tlvs.c:3022 > #10 0x000055708e3eefb0 in format_item_ext_subtlvs (exts=0x614000047440, buf=0x0, json=0x6040000a2190, indent=2, mtid=2) at isisd/isis_tlvs.c:1313 > #11 0x000055708e3fd599 in format_item_extended_reach (mtid=2, i=0x60300015aed0, buf=0x0, json=0x6040000a1bd0, indent=0) at isisd/isis_tlvs.c:3763 > #12 0x000055708e40d46a in format_item (mtid=2, context=ISIS_CONTEXT_LSP, type=ISIS_TLV_MT_REACH, i=0x60300015aed0, buf=0x0, json=0x6040000a1bd0, indent=0) at isisd/isis_tlvs.c:6789 > #13 0x000055708e40d4fc in format_items_ (mtid=2, context=ISIS_CONTEXT_LSP, type=ISIS_TLV_MT_REACH, items=0x60600021d160, buf=0x0, json=0x6040000a1bd0, indent=0) at isisd/isis_tlvs.c:6804 > #14 0x000055708e40edbc in format_mt_items (context=ISIS_CONTEXT_LSP, type=ISIS_TLV_MT_REACH, m=0x6180000845d8, buf=0x0, json=0x6040000a1bd0, indent=0) at isisd/isis_tlvs.c:7147 > #15 0x000055708e4111e9 in format_tlvs (tlvs=0x618000084480, buf=0x0, json=0x6040000a1bd0, indent=0) at isisd/isis_tlvs.c:7572 > #16 0x000055708e4114ce in isis_format_tlvs (tlvs=0x618000084480, json=0x6040000a1bd0) at isisd/isis_tlvs.c:7613 > #17 0x000055708e36f167 in lsp_print_detail (lsp=0x612000058b40, vty=0x0, json=0x6040000a1bd0, dynhost=1 '\001', isis=0x60d00001f800) at isisd/isis_lsp.c:785 > #18 0x000055708e36f31f in lsp_print_all (vty=0x0, json=0x6040000a0490, head=0x61f000005488, detail=1 '\001', dynhost=1 '\001', isis=0x60d00001f800) at isisd/isis_lsp.c:820 > #19 0x000055708e4379fc in show_isis_database_lspdb_json (json=0x6040000a0450, area=0x61f000005480, level=0, lspdb=0x61f000005488, sysid_str=0x0, ui_level=1) at isisd/isisd.c:2683 > #20 0x000055708e437ef9 in show_isis_database_json (json=0x6040000a0310, sysid_str=0x0, ui_level=1, isis=0x60d00001f800) at isisd/isisd.c:2754 > #21 0x000055708e438357 in show_isis_database_common (vty=0x62e000060400, json=0x6040000a0310, sysid_str=0x0, ui_level=1, isis=0x60d00001f800) at isisd/isisd.c:2788 > #22 0x000055708e438591 in show_isis_database (vty=0x62e000060400, json=0x6040000a0310, sysid_str=0x0, ui_level=1, vrf_name=0x7fad89806300 <vrf_default_name> "default", all_vrf=false) > at isisd/isisd.c:2825 > #23 0x000055708e43891d in show_database (self=0x55708e5519c0 <show_database_cmd>, vty=0x62e000060400, argc=5, argv=0x6040000a02d0) at isisd/isisd.c:2855 > #24 0x00007fad893a9767 in cmd_execute_command_real (vline=0x60300015f220, vty=0x62e000060400, cmd=0x0, up_level=0) at lib/command.c:1002 > #25 0x00007fad893a9adc in cmd_execute_command (vline=0x60300015f220, vty=0x62e000060400, cmd=0x0, vtysh=0) at lib/command.c:1061 > #26 0x00007fad893aa728 in cmd_execute (vty=0x62e000060400, cmd=0x621000025900 "show isis database detail json ", matched=0x0, vtysh=0) at lib/command.c:1227 Note that prior to 2e670cd779, there was no crash but only the last "srv6-sid-structure" was displayed. A "srv6-sid-structure" should be displayed for each "sid". This commit also fix this. Was: > "srv6-lan-endx-sid": [ > { > "sid": "fc00:0:1:1::", > "weight": 0, > "algorithm": "SPF", > "neighbor-id": "0000.0000.0002" > }, > { > "sid": "fc00:0:1:2::", > "weight": 0, > "algorithm": "SPF", > "neighbor-id": "0000.0000.0003" > } > ], > "srv6-sid-structure": { > "loc-block-len": 32, > "loc-node-len": 16, > "func-len": 16, > "arg-len": 0 > }, Now (srv6-sid-structure are identical but they are not always): > "srv6-lan-endx-sid": [ > { > "sid": "fc00:0:1:1::", > "algorithm": "SPF", > "neighbor-id": "0000.0000.0002", > "srv6-sid-structure": { > "loc-block-len": 32, > "loc-node-len": 16, > "func-len": 8, > "arg-len": 0 > }, > }, > { > "sid": "fc00:0:1:2::", > "algorithm": "SPF", > "neighbor-id": "0000.0000.0003", > "srv6-sid-structure": { > "loc-block-len": 32, > "loc-node-len": 16, > "func-len": 16, > "arg-len": 0 > }, > } > ], Fixes: 2e670cd779 ("isisd: fix display of srv6 subsubtlvs") Fixes: 648a158802 ("isisd: Add SRv6 End.X SID to Sub-TLV format func") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix crash when displaying asla in jsonLouis Scalbert2024-05-231-1/+112
| | | | | | | Fix crash when displaying ASLAs (Application Specific Link-Attributes) with JSON Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: add json display of extended admin groupsLouis Scalbert2024-05-231-2/+17
| | | | | | Add JSON display of extended admin groups Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix show database json formatLouis Scalbert2024-05-231-25/+770
| | | | | | | | | | "show isis database [detail] json" returns invalid or incorrect JSON that is difficult to parse. Fix key with '-' characters, add booleans and null data when possible. Deprecate the old format. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix display of srv6 subsubtlvsLouis Scalbert2024-05-231-2/+4
| | | | | | | Fix display of srv6 subsubtlvs Fixes: 648a158802 ("isisd: Add SRv6 End.X SID to Sub-TLV format func") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: display MT name in show isis database detail jsonLouis Scalbert2024-05-231-0/+2
| | | | | | | | | Only the MT ID is displayed. Display the MT description as well. Fixes: a2cac12a63 ("isisd: Add json to show isis database command.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix keys display in show isis database detail jsonLouis Scalbert2024-05-231-12/+14
| | | | | | | | | Some keys are wrongly displayed at the JSON parent level. Add the key at the current level. Fixes: a2cac12a63 ("isisd: Add json to show isis database command.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix multiple values display in show isis database detail jsonLouis Scalbert2024-05-231-15/+54
| | | | | | | | | | | | | | | | | Multiple occurrences of the same (sub-)TLVs are mixed into a single JSON object. Last values replaces the previous. Display all the occurrences in an array for the following (sub-)TLVs: - is-reach - ip-reach - ext-reach - ext-ip-reach - ipv6-reach - MT - prefix-SID Fixes: a2cac12a63 ("isisd: Add json to show isis database command.") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
* isisd: fix ip/ipv6 reachability tlvsIgor Ryzhov2024-04-021-2/+8
| | | | | | | | | | Don't allocate subtlvs container if there's nothing to add to it. If the container is allocated, the "sub-TLVs presence" bit is set in the TLVs even if there's no actual sub-TLVs, what violates the RFC. Fixes #14514. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: Remove Crypto openSSL define from zebra.hDonald Sharp2024-01-041-0/+5
| | | | | | | Only a couple of places use this. Move these to a better spot. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* isisd: Fix CID 1568129 (Null pointer dereference)Carmine Scarpitta2023-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Fix this coverity issue: *** CID 1568129: Null pointer dereferences (REVERSE_INULL) /isisd/isis_tlvs.c: 2813 in unpack_item_srv6_end_sid() 2807 sid->subsubtlvs = NULL; 2808 } 2809 2810 append_item(&subtlvs->srv6_end_sids, (struct isis_item *)sid); 2811 return 0; 2812 out: >>> CID 1568129: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "sid" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 2813 if (sid) 2814 free_item_srv6_end_sid((struct isis_item *)sid); 2815 return 1; 2816 } 2817 2818 /* Functions related to TLVs 1 Area Addresses */ Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
* isisd: Add support for SRv6 Adjacency SIDsCarmine Scarpitta2023-09-111-0/+38
| | | | | | | | | | | | | | | | | | | An SRv6 adjacency SID is a SID that is associated with a particular adjacency. Adjacency SIDs are advertised using the SRv6 End.X SID Sub-TLV (RFC 9352 section #8.1) or SRv6 LAN End.X SID Sub-TLV (RFC 9352 section #8.2). This commit defines the following Adj SIDs management functions: * srv6_endx_sid_add_single: add a new SRv6 Adjacency SID * srv6_endx_sid_del: delete an SRv6 Adjacency SID * isis_srv6_endx_sid_find: lookup SRv6 End.X SID by type It also attaches some callbacks to the hooks isis_adj_state_change_hook, isis_adj_ip_enabled_hook, isis_adj_ip_disabled_hook, which are responsible for installing/removing an SRv6 Adjacency SID automatically when the state of an IS-IS adjacency changes. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Make MTYPE_ISIS_SUBSUBTLV non-staticCarmine Scarpitta2023-09-111-1/+1
| | | | | | | | | | We need to allocate memory SRv6 SID Structure Sub-Sub-TLV in isis_srv6.c. MTYPE_ISIS_SUBSUBTLV is statically defined in isis_tlvs.c and therefore is not visible in isis_srv6.c. Let's make MTYPE_ISIS_SUBSUBTLV non-static to provide visibility to the external world.. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Unpack SRv6 (LAN) End.X SID Sub-TLVCarmine Scarpitta2023-09-111-0/+97
| | | | | | | Extend the Extended IS Reachability TLV unpack function to unpack the SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV, if present. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Pack SRv6 (LAN) End.X SID Sub-TLVCarmine Scarpitta2023-09-111-0/+85
| | | | | | | Extend the Extended IS Reachability TLV pack function to pack the SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV, if present. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add SRv6 End.X SID to Sub-TLV format funcCarmine Scarpitta2023-09-111-0/+150
| | | | | | | Extend the Extended IS Reachability TLV format function to show the SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV, if present. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add SRv6 End.X SID to Sub-TLV copy funcCarmine Scarpitta2023-09-111-0/+55
| | | | | | | Extend the Extended IS Reachability TLV copy function to copy the SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV, if present. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add SRv6 End.X SID to IS ext reach Sub-TLVsCarmine Scarpitta2023-09-111-0/+15
| | | | | | | | | Add SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV to the Extended IS Reachability Sub-TLVs data structure and perform proper initialization/free when the Sub-TLVs data structure is allocated/destroyed. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Update copyright info in isis_tlvs.[c,h]Carmine Scarpitta2023-09-111-0/+3
| | | | | | | Add copyright claim for "IS-IS Extensions to Support SRv6" (RFC 9352) to isis_tlvs.c and isis_tlvs.h. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add structure when building End SID Sub-TLVCarmine Scarpitta2023-09-111-0/+5
| | | | | | | Encode SRv6 SID Structure Sub-Sub-TLV when building the SRv6 End SID Sub-TLV. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add func to build Sub-Sub-TLV from End SIDCarmine Scarpitta2023-09-111-0/+12
| | | | | | | | Add a function to build an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9) to advertise the structure of a specific SRv6 End SID passed as an argument. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add End SID when building SRv6 Locator TLVCarmine Scarpitta2023-09-111-0/+24
| | | | | | Encode SRv6 End SID Sub-TLVs when building the SRv6 Locator TLV. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add func to build Sub-TLV from SRv6 End SIDCarmine Scarpitta2023-09-111-0/+34
| | | | | | | Add a function to build an SRv6 End SID TLV (RFC 9352 section #7.2) to advertise a specific SRv6 End SID passed as an argument. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add function to build TLV from SRv6 LocatorCarmine Scarpitta2023-09-111-0/+17
| | | | | | | Add a function to build an SRv6 Locator TLV (RFC 9352 section #7.1) to advertise a specific SRv6 Locator passed as an argument. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Bind SRv6 SID Struct ops to TLV typeCarmine Scarpitta2023-09-111-0/+3
| | | | | | | | | | | General Sub-Sub-TLV processing functions (i.e., copy, format, free, pack, and unpack) perform a lookup of the handler specific for a Sub-Sub-TLV in the `tlv_table`, and then call the specific handler to process the Sub-Sub-TLV. This commit adds the handlers for the SRv6 Structure Sub-Sub-TLV (stored in `subsubtlv_srv6_sid_structure_ops`) to the `tlv_table`. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Define TLV ops for SID Struct Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+1
| | | | | | | Use the SUBSUBTLV_OPS macro to define the TLV operations for the SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add unpack func for SID Struct Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+27
| | | | | | | Add a function to unpack an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Pack SID Struct when packing Sub-Sub-TLVsCarmine Scarpitta2023-09-111-0/+5
| | | | | | | Extend generic Sub-Sub-TLVs pack function to pack SRv6 SID Structure Sub-Sub-TLVs (RFC 9352 section FRRouting#9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add pack func for SID Structure Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+20
| | | | | | | Add a function to pack an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Free SID Struct when freeing Sub-Sub-TLVsCarmine Scarpitta2023-09-111-0/+2
| | | | | | | Extend generic Sub-Sub-TLVs free function to free SRv6 SID Structure Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add free func for SID Structure Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+6
| | | | | | | Add a function to free an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add SID Struct to Sub-Sub-TLVs format funcCarmine Scarpitta2023-09-111-0/+2
| | | | | | | Extend generic Sub-Sub-TLVs format function to return information about SRv6 SID Structure Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add format func for SID Struct Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+34
| | | | | | | Add a function to return information about an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Copy SID Struct when copying Sub-Sub-TLVsCarmine Scarpitta2023-09-111-0/+3
| | | | | | | Extend generic Sub-Sub-TLVs copy function to copy SRv6 SID Structure Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add copy func for SID Structure Sub-Sub-TLVCarmine Scarpitta2023-09-111-0/+20
| | | | | | | Add a function to copy an SRv6 SID Structure Sub-Sub-TLV (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Unpack Sub-Sub-TLVs of SRv6 End SID Sub-TLVCarmine Scarpitta2023-09-111-0/+14
| | | | | | | 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>
* isisd: Pack Sub-Sub-TLVs of SRv6 End SID Sub-TLVCarmine Scarpitta2023-09-111-3/+15
| | | | | | | Extend SRv6 End SID Sub-TLV pack function to pack Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Free Sub-Sub-TLVs of SRv6 End SID Sub-TLVCarmine Scarpitta2023-09-111-0/+4
| | | | | | | Extend SRv6 End SID Sub-TLV free function to free Sub-Sub-TLVs (RFC 9352 section #9). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add Sub-Sub-TLVs to End SID format funcCarmine Scarpitta2023-09-111-0/+14
| | | | | | | Extend SRv6 End SID Sub-TLV format function to return information about Sub-Sub-TLVs (RFC 9352 section #7.2). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Copy Sub-Sub-TLVs of SRv6 End SID Sub-TLVCarmine Scarpitta2023-09-111-0/+1
| | | | | | | Extend SRv6 End SID Sub-TLV copy function to copy Sub-Sub-TLVs (RFC 9352 section #7.2). Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add pack func for Sub-Sub-TLVs in generalCarmine Scarpitta2023-09-111-0/+19
| | | | | | | | | | Add a function to pack all the Sub-Sub-TLVs passed as an argument. At this time, this function does not pack any Sub-Sub-TLVs because no Sub-Sub-TLVs have been defined yet. This function will be extended in future commits to pack specific Sub-Sub-TLVs, as they become supported. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add free func for Sub-Sub-TLVs in generalCarmine Scarpitta2023-09-111-0/+8
| | | | | | | | | | | | Add a function to free all the Sub-Sub-TLVs and the `isis_subsubtlvs` data structure passed as an argument. At this time, this function only frees the `isis_subsubtlvs`. It does not free any specific Sub-Sub-TLVs because no Sub-Sub-TLVs have been defined yet. This function will be extended in future commits to free specific Sub-Sub-TLVs, as they become supported. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
* isisd: Add format func for Sub-Sub-TLVs in generalCarmine Scarpitta2023-09-111-0/+10
| | | | | | | | | | | | Add a function to return information about all the Sub-Sub-TLVs passed as an argument. At this time, this function does nothing because no Sub-Sub-TLVs have been defined yet. This function will be extended in future commits to return information about specific Sub-Sub-TLVs, as they become supported. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>