Commit graph

163 commits

Author SHA1 Message Date
Mark Stapp e88f0a4778 isisd: clean up -Wshadow warnings
Clean up various "shadow" warnings.

Signed-off-by: Mark Stapp <mjs@cisco.com>
2025-04-08 14:41:26 -04:00
Philippe Guibert 4150f9bbb1 isisd: fix erroneous srv6 information in database
The show isis database detail command dumps invalid srv6 information:
>  SRv6 Locator: fc00:0:6::/64 (Metric: 0) ipv6-unicast
>    Sub-TLVs:
>      SRv6 End SID Endpoint Behavior: unknown, SID value: fc00:0:6:0:1::
>
>  MT Reachability: 0123.6452.1973.03 (Metric: 10) ipv6-unicast
>    Local Interface IPv6 Address(es): 192::4:3
>    SRv6 Lan End.X SID: fc00:0:3:0:43::, Algorithm: SPF, Weight: 0, Endpoint Behavior: End.DX6, Flags: B:0, S:0, P:0 Neighbor-ID: 0123.6452.1975
>        SRv6 SID Structure Locator Block length: 40, Locator Node length: 24, Function length: 16, Argument length: 0,

The behavior codepoint should use the IANA definitions to display the
correct value. Fix this by calling the appropriate convert function.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2025-01-29 12:20:24 +01:00
Dmytro Shytyi be4eb370db
isisd: properly display srv6 algorithm
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>
2024-11-12 15:24:57 +01:00
Donatas Abraitis 17206eb818 isisd: Remove deprecated JSON fields
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-09-19 23:44:25 +03:00
Louis Scalbert d61758140d isisd: fix rcap tlv double-free crash
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>
2024-09-16 14:47:38 +02:00
Louis Scalbert f1bc6c5d81 isisd: fix crash when reading asla
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>
2024-09-03 17:30:41 +02:00
Louis Scalbert cd2e872e65 isisd: fix srv6 endx sid key name
srv6EndSID is actually srv6EndXSID.

Fixes: d5879267aa ("isisd: fix show database json format")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-06-24 13:48:11 +02:00
Louis Scalbert 3e82cf2928 isisd: fix neighbor id json key
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>
2024-06-24 13:48:11 +02:00
Louis Scalbert c554b5d90a isisd: remane flags_json variable
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>
2024-06-24 13:48:11 +02:00
Louis Scalbert c06fb90b63 isisd: fix display crash srv6 sid structure in json
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>
2024-06-21 17:54:00 +02:00
Louis Scalbert 1c397942a4 isisd: fix crash when displaying asla in json
Fix crash when displaying ASLAs (Application Specific Link-Attributes)
with JSON

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-23 14:59:38 +02:00
Louis Scalbert 2864b96332 isisd: add json display of extended admin groups
Add JSON display of extended admin groups

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-05-23 14:59:19 +02:00
Louis Scalbert d5879267aa isisd: fix show database json format
"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>
2024-05-23 14:43:21 +02:00
Louis Scalbert 2e670cd779 isisd: fix display of srv6 subsubtlvs
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>
2024-05-23 14:43:21 +02:00
Louis Scalbert b9870e9131 isisd: display MT name in show isis database detail json
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>
2024-05-23 14:43:21 +02:00
Louis Scalbert 9730e604e6 isisd: fix keys display in show isis database detail json
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>
2024-05-23 14:43:21 +02:00
Louis Scalbert 9a83c6cf72 isisd: fix multiple values display in show isis database detail json
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>
2024-05-23 14:43:21 +02:00
Igor Ryzhov c3d34b84f3 isisd: fix ip/ipv6 reachability tlvs
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>
2024-04-02 14:48:52 +03:00
Donald Sharp 2bf051a577 *: Remove Crypto openSSL define from zebra.h
Only a couple of places use this.  Move these to a better
spot.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-01-04 14:02:34 -05:00
Carmine Scarpitta 95eadb5068 isisd: Fix CID 1568129 (Null pointer dereference)
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>
2023-09-15 12:39:45 +02:00
Carmine Scarpitta ecb2675f1e isisd: Add support for SRv6 Adjacency SIDs
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>
2023-09-11 22:11:47 +02:00
Carmine Scarpitta df121f68e7 isisd: Make MTYPE_ISIS_SUBSUBTLV non-static
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>
2023-09-11 22:11:46 +02:00
Carmine Scarpitta d56c0d23b0 isisd: Unpack SRv6 (LAN) End.X SID Sub-TLV
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>
2023-09-11 22:11:45 +02:00
Carmine Scarpitta 8b6a73c306 isisd: Pack SRv6 (LAN) End.X SID Sub-TLV
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>
2023-09-11 22:11:45 +02:00
Carmine Scarpitta 648a158802 isisd: Add SRv6 End.X SID to Sub-TLV format func
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>
2023-09-11 22:11:44 +02:00
Carmine Scarpitta e083282e83 isisd: Add SRv6 End.X SID to Sub-TLV copy func
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>
2023-09-11 22:11:43 +02:00
Carmine Scarpitta 3740efacfb isisd: Add SRv6 End.X SID to IS ext reach Sub-TLVs
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>
2023-09-11 22:11:42 +02:00
Carmine Scarpitta 65c4a84293 isisd: Update copyright info in isis_tlvs.[c,h]
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>
2023-09-11 22:11:41 +02:00
Carmine Scarpitta c682450894 isisd: Add structure when building End SID Sub-TLV
Encode SRv6 SID Structure Sub-Sub-TLV when building the SRv6 End SID
Sub-TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 22:11:40 +02:00
Carmine Scarpitta 81579d7de2 isisd: Add func to build Sub-Sub-TLV from End SID
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>
2023-09-11 22:11:39 +02:00
Carmine Scarpitta cfc90fc490 isisd: Add End SID when building SRv6 Locator TLV
Encode SRv6 End SID Sub-TLVs when building the SRv6 Locator TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 22:11:39 +02:00
Carmine Scarpitta 1804d70cbd isisd: Add func to build Sub-TLV from SRv6 End SID
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>
2023-09-11 22:11:38 +02:00
Carmine Scarpitta 2aaa75a6f3 isisd: Add function to build TLV from SRv6 Locator
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>
2023-09-11 22:11:38 +02:00
Carmine Scarpitta 77a8c68df6 isisd: Bind SRv6 SID Struct ops to TLV type
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>
2023-09-11 22:11:36 +02:00
Carmine Scarpitta 46a93507f3 isisd: Define TLV ops for SID Struct Sub-Sub-TLV
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>
2023-09-11 22:11:35 +02:00
Carmine Scarpitta 5579ca40ef isisd: Add unpack func for SID Struct Sub-Sub-TLV
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>
2023-09-11 22:11:35 +02:00
Carmine Scarpitta 8953be7a0c isisd: Pack SID Struct when packing Sub-Sub-TLVs
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>
2023-09-11 22:11:34 +02:00
Carmine Scarpitta 2dfe8ef463 isisd: Add pack func for SID Structure Sub-Sub-TLV
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>
2023-09-11 22:11:34 +02:00
Carmine Scarpitta b5cd8ab2b7 isisd: Free SID Struct when freeing Sub-Sub-TLVs
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>
2023-09-11 22:11:33 +02:00
Carmine Scarpitta 9f176ae0a6 isisd: Add free func for SID Structure Sub-Sub-TLV
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>
2023-09-11 22:11:33 +02:00
Carmine Scarpitta 43072e0e39 isisd: Add SID Struct to Sub-Sub-TLVs format func
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>
2023-09-11 22:11:32 +02:00
Carmine Scarpitta af4870f600 isisd: Add format func for SID Struct Sub-Sub-TLV
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>
2023-09-11 22:11:32 +02:00
Carmine Scarpitta 2d8c968867 isisd: Copy SID Struct when copying Sub-Sub-TLVs
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>
2023-09-11 22:11:32 +02:00
Carmine Scarpitta 5ff2f97d00 isisd: Add copy func for SID Structure Sub-Sub-TLV
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>
2023-09-11 22:11:31 +02:00
Carmine Scarpitta 66c50ce22a 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>
2023-09-11 22:11:30 +02:00
Carmine Scarpitta bc6e273046 isisd: Pack Sub-Sub-TLVs of SRv6 End SID Sub-TLV
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>
2023-09-11 22:11:30 +02:00
Carmine Scarpitta 422ea2d410 isisd: Free Sub-Sub-TLVs of SRv6 End SID Sub-TLV
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>
2023-09-11 22:11:29 +02:00
Carmine Scarpitta 584f41d8f3 isisd: Add Sub-Sub-TLVs to End SID format func
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>
2023-09-11 22:11:29 +02:00
Carmine Scarpitta 0089b3b94a isisd: Copy Sub-Sub-TLVs of SRv6 End SID Sub-TLV
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>
2023-09-11 22:11:28 +02:00
Carmine Scarpitta dce3e4515f isisd: Add pack func for Sub-Sub-TLVs in general
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>
2023-09-11 22:11:28 +02:00