]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
19 months agolib: Add CLI node for SRv6 Node MSD
Carmine Scarpitta [Fri, 4 Aug 2023 06:12:54 +0000 (08:12 +0200)]
lib: Add CLI node for SRv6 Node MSD

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Remove SIDs when parent locator is deleted
Carmine Scarpitta [Tue, 30 May 2023 16:55:44 +0000 (18:55 +0200)]
isisd: Remove SIDs when parent locator is deleted

Clean up SRv6 SIDs when the parent locator is deleted.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Initialize/free SRv6 adjacency SIDs list
Carmine Scarpitta [Sat, 3 Jun 2023 00:21:30 +0000 (02:21 +0200)]
isisd: Initialize/free SRv6 adjacency SIDs list

Initialize/free SRv6 adjacency SIDs list when an IS-IS area is
created/destroyed.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Extend `sid_exist` to consider adj SIDs
Carmine Scarpitta [Sat, 3 Jun 2023 11:39:15 +0000 (13:39 +0200)]
isisd: Extend `sid_exist` to consider adj SIDs

The function `sid_exist` verifies if a given SRv6 SID has already been
allocated for a given IS-IS area. This commit extends `sid_exist` to
also consider adjacency SIDs when checking for the existence of the SID.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Extend IS-IS adjacency with SRv6 adj SIDs
Carmine Scarpitta [Sat, 3 Jun 2023 00:14:42 +0000 (02:14 +0200)]
isisd: Extend IS-IS adjacency with SRv6 adj SIDs

Initialize/remove SRv6 SIDs list when an IS-IS adjacency is
created/deleted.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add support for SRv6 Adjacency SIDs
Carmine Scarpitta [Sat, 3 Jun 2023 00:08:08 +0000 (02:08 +0200)]
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>
19 months agoisisd: Add functions to install/remove adj SIDs
Carmine Scarpitta [Sat, 3 Jun 2023 06:41:50 +0000 (08:41 +0200)]
isisd: Add functions to install/remove adj SIDs

Add two functions to install/remove Adjacency SIDs into the data plane
through zebra.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add data structure for SRv6 Adjacency SIDs
Carmine Scarpitta [Sat, 3 Jun 2023 20:06:04 +0000 (22:06 +0200)]
isisd: Add data structure 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 a data structure `srv6_adjacency` for storing
information about an SRv6 Adjacency SID. This data structure will be
used to support SRv6 Adjacency SIDs functionalities in future commits.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Make MTYPE_ISIS_SUBSUBTLV non-static
Carmine Scarpitta [Sat, 3 Jun 2023 00:22:02 +0000 (02:22 +0200)]
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>
19 months agoisisd: Unpack SRv6 (LAN) End.X SID Sub-TLV
Carmine Scarpitta [Thu, 25 May 2023 13:21:50 +0000 (15:21 +0200)]
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>
19 months agoisisd: Pack SRv6 (LAN) End.X SID Sub-TLV
Carmine Scarpitta [Sat, 3 Jun 2023 00:39:07 +0000 (02:39 +0200)]
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>
19 months agoisisd: Add SRv6 (LAN) End.X SID Sub-TLV codepoints
Carmine Scarpitta [Thu, 25 May 2023 12:50:00 +0000 (14:50 +0200)]
isisd: Add SRv6 (LAN) End.X SID Sub-TLV codepoints

Add SRv6 End.X SID Sub-TLV and SRv6 LAN End.X SID Sub-TLV codepoints
(defined in "IS-IS Sub-TLVs for TLVs Advertising Neighbor Information"
IANA registry). These codepoints will be used in future commits to
pack/unpack corresponding Sub-TLVs.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 End.X SID to Sub-TLV format func
Carmine Scarpitta [Sat, 3 Jun 2023 00:31:05 +0000 (02:31 +0200)]
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>
19 months agoisisd: Add flags for SRv6 (LAN) End.X SID Sub-TLV
Carmine Scarpitta [Thu, 25 May 2023 11:03:15 +0000 (13:03 +0200)]
isisd: Add flags for SRv6 (LAN) End.X SID Sub-TLV

SRv6 End.X SID Sub-TLV (RFC 9352 section #8.1) and SRv6 LAN End.X SID
Sub-TLV (RFC 9352 section #8.2) contain a `flag` field. Currently, three
flags are defined:
* B-Flag: Backup flag
* S-Flag: Set flag
* P-Flag: Persistent flag

This commit defines three constants representing these flags.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 End.X SID to Sub-TLV copy func
Carmine Scarpitta [Sat, 3 Jun 2023 00:37:07 +0000 (02:37 +0200)]
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>
19 months agoisisd: Add SRv6 End.X SID to IS ext reach Sub-TLVs
Carmine Scarpitta [Thu, 25 May 2023 10:13:33 +0000 (12:13 +0200)]
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>
19 months agoisisd: Add SRv6 LAN End.X SID Sub-TLV data struct
Carmine Scarpitta [Thu, 25 May 2023 09:50:18 +0000 (11:50 +0200)]
isisd: Add SRv6 LAN End.X SID Sub-TLV data struct

Add a data structure to represent an SRv6 LAN End.X SID Sub-TLV as per
RFC 9352 section #8.2.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 End.X SID Sub-TLV data structure
Carmine Scarpitta [Thu, 25 May 2023 09:49:47 +0000 (11:49 +0200)]
isisd: Add SRv6 End.X SID Sub-TLV data structure

Add a data structure to represent an SRv6 End.X SID Sub-TLV as per
RFC 9352 section #8.1.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Update copyright info in isis_tlvs.[c,h]
Carmine Scarpitta [Sat, 18 Feb 2023 00:36:32 +0000 (01:36 +0100)]
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>
19 months agoisisd: Advertise SRv6 Locator in Prefix Reach TLV
Carmine Scarpitta [Tue, 6 Dec 2022 20:54:25 +0000 (21:54 +0100)]
isisd: Advertise SRv6 Locator in Prefix Reach TLV

According to RFC 9352 section #5, the SRv6 Locators associated with
algorithms 0 and 1 should be also advertised in a Prefix Reachability
TLV (236 or 237) to allow legacy routers (i.e., routers that do not
support SRv6) installing a forwarding entry for algorithms 0 and 1 SRv6
traffic.

This commits extend IS-IS to advertise SRv6 Locators in IPv6
Reachability TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 Locator TLV to the LSP
Carmine Scarpitta [Wed, 22 Feb 2023 00:25:12 +0000 (01:25 +0100)]
isisd: Add SRv6 Locator TLV to the LSP

Add the SRv6 Locator TLV and its Sub-TLV and Sub-Sub-TLVs to the LSP.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add structure when building End SID Sub-TLV
Carmine Scarpitta [Wed, 15 Feb 2023 11:27:53 +0000 (12:27 +0100)]
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>
19 months agoisisd: Add func to build Sub-Sub-TLV from End SID
Carmine Scarpitta [Wed, 15 Feb 2023 11:00:24 +0000 (12:00 +0100)]
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>
19 months agoisisd: Add End SID when building SRv6 Locator TLV
Carmine Scarpitta [Thu, 16 Mar 2023 09:24:04 +0000 (10:24 +0100)]
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>
19 months agoisisd: Add func to build Sub-TLV from SRv6 End SID
Carmine Scarpitta [Wed, 15 Feb 2023 11:15:45 +0000 (12:15 +0100)]
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>
19 months agoisisd: Add function to build TLV from SRv6 Locator
Carmine Scarpitta [Fri, 24 Feb 2023 21:27:25 +0000 (22:27 +0100)]
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>
19 months agoisisd: Add func to fill in SID Struct Sub-Sub-TLV
Carmine Scarpitta [Wed, 15 Feb 2023 10:49:11 +0000 (11:49 +0100)]
isisd: Add func to fill in SID Struct Sub-Sub-TLV

Add a function to fill in an SRv6 SID Structure Sub-Sub-TLV with
information from an SRv6 SID (RFC 9352 section #9).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add func to fill in an SRv6 End SID Sub-TLV
Carmine Scarpitta [Wed, 15 Feb 2023 10:43:03 +0000 (11:43 +0100)]
isisd: Add func to fill in an SRv6 End SID Sub-TLV

Add a function to fill in an SRv6 End SID Sub-TLV with information from
an SRv6 End SID (RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add function to fill in an SRv6 Locator TLV
Carmine Scarpitta [Wed, 15 Feb 2023 10:35:46 +0000 (11:35 +0100)]
isisd: Add function to fill in an SRv6 Locator TLV

Add a function to fill in an SRv6 Locator TLV with information from an
SRv6 locator (RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 locator data structure
Carmine Scarpitta [Wed, 15 Feb 2023 10:23:34 +0000 (11:23 +0100)]
isisd: Add SRv6 locator data structure

Add a data structure to represent an SRv6 locator (RFC 9352
section 7.1)

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Bind SRv6 SID Struct ops to TLV type
Carmine Scarpitta [Wed, 15 Feb 2023 12:28:25 +0000 (13:28 +0100)]
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>
19 months agoisisd: Define TLV ops for SID Struct Sub-Sub-TLV
Carmine Scarpitta [Wed, 15 Feb 2023 12:27:41 +0000 (13:27 +0100)]
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>
19 months agoisisd: Add unpack func for SID Struct Sub-Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 15:24:56 +0000 (16:24 +0100)]
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>
19 months agoisisd: Pack SID Struct when packing Sub-Sub-TLVs
Carmine Scarpitta [Sun, 12 Mar 2023 20:27:54 +0000 (21:27 +0100)]
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>
19 months agoisisd: Add pack func for SID Structure Sub-Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 15:03:58 +0000 (16:03 +0100)]
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>
19 months agoisisd: Free SID Struct when freeing Sub-Sub-TLVs
Carmine Scarpitta [Sat, 11 Mar 2023 10:55:03 +0000 (11:55 +0100)]
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>
19 months agoisisd: Add free func for SID Structure Sub-Sub-TLV
Carmine Scarpitta [Wed, 1 Mar 2023 15:42:26 +0000 (16:42 +0100)]
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>
19 months agoisisd: Add SID Struct to Sub-Sub-TLVs format func
Carmine Scarpitta [Sat, 11 Mar 2023 10:55:47 +0000 (11:55 +0100)]
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>
19 months agoisisd: Add format func for SID Struct Sub-Sub-TLV
Carmine Scarpitta [Wed, 1 Mar 2023 15:42:56 +0000 (16:42 +0100)]
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>
19 months agoisisd: Copy SID Struct when copying Sub-Sub-TLVs
Carmine Scarpitta [Sat, 11 Mar 2023 10:57:05 +0000 (11:57 +0100)]
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>
19 months agoisisd: Add copy func for SID Structure Sub-Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 14:52:01 +0000 (15:52 +0100)]
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>
19 months agoisisd: Add data struct for SID Struct Sub-Sub-TLV
Carmine Scarpitta [Sun, 12 Mar 2023 22:38:48 +0000 (23:38 +0100)]
isisd: Add data struct for SID Struct Sub-Sub-TLV

Add a data structure representing the SRv6 SID Structure Sub-Sub-TLV
(RFC 9352 section #9).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Unpack Sub-Sub-TLVs of SRv6 End SID Sub-TLV
Carmine Scarpitta [Sat, 11 Mar 2023 11:05:37 +0000 (12:05 +0100)]
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>
19 months agoisisd: Pack Sub-Sub-TLVs of SRv6 End SID Sub-TLV
Carmine Scarpitta [Sat, 3 Jun 2023 10:11:27 +0000 (12:11 +0200)]
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>
19 months agoisisd: Free Sub-Sub-TLVs of SRv6 End SID Sub-TLV
Carmine Scarpitta [Sat, 11 Mar 2023 11:01:58 +0000 (12:01 +0100)]
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>
19 months agoisisd: Add Sub-Sub-TLVs to End SID format func
Carmine Scarpitta [Sat, 11 Mar 2023 11:01:07 +0000 (12:01 +0100)]
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>
19 months agoisisd: Copy Sub-Sub-TLVs of SRv6 End SID Sub-TLV
Carmine Scarpitta [Sat, 11 Mar 2023 11:00:01 +0000 (12:00 +0100)]
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>
19 months agoisisd: Add pack func for Sub-Sub-TLVs in general
Carmine Scarpitta [Sun, 12 Mar 2023 20:19:12 +0000 (21:19 +0100)]
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>
19 months agoisisd: Add free func for Sub-Sub-TLVs in general
Carmine Scarpitta [Fri, 17 Feb 2023 22:27:07 +0000 (23:27 +0100)]
isisd: Add free func for Sub-Sub-TLVs in general

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>
19 months agoisisd: Add format func for Sub-Sub-TLVs in general
Carmine Scarpitta [Wed, 1 Mar 2023 15:46:57 +0000 (16:46 +0100)]
isisd: Add format func for Sub-Sub-TLVs in general

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>
19 months agoisisd: Add copy func for Sub-Sub-TLVs in general
Carmine Scarpitta [Tue, 14 Feb 2023 14:50:48 +0000 (15:50 +0100)]
isisd: Add copy func for Sub-Sub-TLVs in general

Add a function to copy all the Sub-Sub-TLVs passed as an argument.

At this time, this function does not copy any Sub-Sub-TLVs because no
Sub-Sub-TLVs have been defined yet. This function will be extended in
future commits to copy specific Sub-Sub-TLVs, as they become supported.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add alloc func for Sub-Sub-TLVs in general
Carmine Scarpitta [Sat, 3 Jun 2023 00:41:36 +0000 (02:41 +0200)]
isisd: Add alloc func for Sub-Sub-TLVs in general

Add a function to allocate memory for IS-IS Sub-Sub-TLVs.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add struct to store Sub-Sub-TLVs info
Carmine Scarpitta [Fri, 24 Feb 2023 21:37:18 +0000 (22:37 +0100)]
isisd: Add struct to store Sub-Sub-TLVs info

Add a data structure to store IS-IS Sub-Sub-TLVs information. At this
time, does not contain any Sub-Sub-TLV information because no
Sub-Sub-TLVs have been defined yet. This data structure will be extended
in future commits to store specific Sub-Sub-TLVs, as they become
supported.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add new macros to define Sub-Sub-TLV ops
Carmine Scarpitta [Tue, 14 Feb 2023 14:43:52 +0000 (15:43 +0100)]
isisd: Add new macros to define Sub-Sub-TLV ops

Add two macros `SUBSUBTLV_OPS` and `ITEM_SUBSUBTLV_OPS` that help the
developer to define the TLV operations for the IS-IS Sub-Sub-TLVs.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Pack SRv6 End SID when packing Sub-TLVs
Carmine Scarpitta [Tue, 14 Feb 2023 11:52:30 +0000 (12:52 +0100)]
isisd: Pack SRv6 End SID when packing Sub-TLVs

Extend generic Sub-TLVs pack function to pack SRv6 End SID Sub-TLVs
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Free SRv6 End SID when freeing Sub-TLVs
Carmine Scarpitta [Tue, 14 Feb 2023 11:51:17 +0000 (12:51 +0100)]
isisd: Free SRv6 End SID when freeing Sub-TLVs

Extend generic Sub-TLVs free function to free SRv6 End SID Sub-TLVs
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 End SID to Sub-TLVs format func
Carmine Scarpitta [Tue, 14 Feb 2023 11:50:19 +0000 (12:50 +0100)]
isisd: Add SRv6 End SID to Sub-TLVs format func

Extend generic Sub-TLVs format function to return information about
SRv6 End SID Sub-TLVs (RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Copy SRv6 End SID when copying Sub-TLVs
Carmine Scarpitta [Tue, 14 Feb 2023 11:49:09 +0000 (12:49 +0100)]
isisd: Copy SRv6 End SID when copying Sub-TLVs

Extend generic Sub-TLVs copy function to copy SRv6 End SID Sub-TLVs
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Bind SRv6 End SID Sub-TLV ops to TLV type
Carmine Scarpitta [Wed, 15 Feb 2023 12:28:06 +0000 (13:28 +0100)]
isisd: Bind SRv6 End SID Sub-TLV ops to TLV type

General Sub-TLV processing functions (i.e., copy, format, free, pack,
and unpack) perform a lookup of the specific handler for a Sub-TLV in
the `tlv_table`, and then call the specific handler to process the
Sub-TLV.
This commit adds the handlers for the SRv6 End SID Sub-TLV (stored in
`tlv_srv6_end_sid_ops`) to the `tlv_table`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Define TLV ops for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 14:44:47 +0000 (15:44 +0100)]
isisd: Define TLV ops for SRv6 End SID Sub-TLV

Use the ITEM_SUBTLV_OPS macro to define the TLV operations for the SRv6
End SID Sub-TLV (RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add unpack func for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 21 Feb 2023 18:47:03 +0000 (19:47 +0100)]
isisd: Add unpack func for SRv6 End SID Sub-TLV

Add a function to unpack an SRv6 End SID Sub-TLV
(RFC 9352 section FRRouting#7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add pack function for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 12:43:42 +0000 (13:43 +0100)]
isisd: Add pack function for SRv6 End SID Sub-TLV

Add a function to pack an SRv6 End SID Sub-TLV
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add free function for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 12:31:53 +0000 (13:31 +0100)]
isisd: Add free function for SRv6 End SID Sub-TLV

Add a function to free an SRv6 End SID Sub-TLV
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add format func for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 12:51:28 +0000 (13:51 +0100)]
isisd: Add format func for SRv6 End SID Sub-TLV

Add a function to return information about an SRv6 End SID Sub-TLV
(RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add copy function for SRv6 End SID Sub-TLV
Carmine Scarpitta [Tue, 14 Feb 2023 12:30:37 +0000 (13:30 +0100)]
isisd: Add copy function for SRv6 End SID Sub-TLV

Add a function to copy an SRv6 End SID Sub-TLV (RFC 9352 section #7.2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add context value for SRv6 End SID Sub-TLV
Carmine Scarpitta [Fri, 24 Feb 2023 21:37:59 +0000 (22:37 +0100)]
isisd: Add context value for SRv6 End SID Sub-TLV

Add a new TLV context value for the SRv6 End SID Sub-TLV. It will be
needed to support unpacking of the Sub-Sub-TLVs of the SRv6 End SID
Sub-TLV in future commits.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Initialize SRv6 End SID Sub-TLVs list
Carmine Scarpitta [Tue, 14 Feb 2023 11:46:52 +0000 (12:46 +0100)]
isisd: Initialize SRv6 End SID Sub-TLVs list

Initialize the SRv6 End SID Sub-TLVs list in `isis_alloc_subtlvs()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 End SID Sub-TLV data structure
Carmine Scarpitta [Tue, 21 Feb 2023 23:35:07 +0000 (00:35 +0100)]
isisd: Add SRv6 End SID Sub-TLV data structure

Add a data structure to represent an SRv6 End SID Sub-TLV as per
RFC 9352 section #7.2.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Initialize SRv6 Locator TLVs list
Carmine Scarpitta [Tue, 14 Feb 2023 11:36:19 +0000 (12:36 +0100)]
isisd: Initialize SRv6 Locator TLVs list

Initialize the SRv6 Locator TLVs list in `isis_alloc_tlvs()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Decode MTID when unpacking SRv6 Locator TLV
Carmine Scarpitta [Sat, 3 Jun 2023 11:30:32 +0000 (13:30 +0200)]
isisd: Decode MTID when unpacking SRv6 Locator TLV

The SRv6 Locator TLV (RFC 9352 section #7.1) starts with the MTID field.
Let's expect the MTID as the first field when we are unpacking an SRv6
Locator TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add MTID when packing SRv6 Locator TLV
Carmine Scarpitta [Sat, 3 Jun 2023 11:28:35 +0000 (13:28 +0200)]
isisd: Add MTID when packing SRv6 Locator TLV

The SRv6 Locator TLV (RFC 9352 section #7.1) starts with the MTID field.
Let's put the MTID as the first field when we are packing an SRv6
Locator TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 Locator TLV to `pack_order` struct
Carmine Scarpitta [Fri, 17 Feb 2023 22:25:32 +0000 (23:25 +0100)]
isisd: Add SRv6 Locator TLV to `pack_order` struct

Add the SRv6 Locator TLV to the `pack_order` data structure.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Bind SRv6 Locator TLV ops to IS-IS TLV type
Carmine Scarpitta [Fri, 27 Jan 2023 15:02:25 +0000 (16:02 +0100)]
isisd: Bind SRv6 Locator TLV ops to IS-IS TLV type

General TLV processing functions (i.e., copy, format, free, pack, and
unpack) perform a lookup of the specific handler for a TLV in the
`tlv_table`, and then call the specific handler to process the TLV.
This commit adds the handlers for the SRv6 Locator TLV (stored in
`tlv_srv6_locator_ops`) to the `tlv_table`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Define TLV ops for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 14:43:58 +0000 (15:43 +0100)]
isisd: Define TLV ops for SRv6 Locator TLV

Use the ITEM_TLV_OPS macro to define the TLV operations for the SRv6
Locator TLV (RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add unpack function for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 11:22:29 +0000 (12:22 +0100)]
isisd: Add unpack function for SRv6 Locator TLV

Add a function to unpack an SRv6 Locator TLV and all its Sub-TLVs
(RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add pack function for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 10:30:45 +0000 (11:30 +0100)]
isisd: Add pack function for SRv6 Locator TLV

Add a function to pack an SRv6 Locator TLV and all its Sub-TLVs
(RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Free SRv6 Locator TLV when freeing TLVs
Carmine Scarpitta [Fri, 17 Feb 2023 22:28:40 +0000 (23:28 +0100)]
isisd: Free SRv6 Locator TLV when freeing TLVs

Extend generic TLVs free function to free SRv6 Locator TLVs (RFC 9352
section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add free function for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 10:09:51 +0000 (11:09 +0100)]
isisd: Add free function for SRv6 Locator TLV

Add a function to free an SRv6 Locator TLV and all its Sub-TLVs
(RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 Locator TLV to TLVs format func
Carmine Scarpitta [Thu, 26 Jan 2023 15:07:24 +0000 (16:07 +0100)]
isisd: Add SRv6 Locator TLV to TLVs format func

Extend generic TLVs format function to return information about SRv6
Locator TLVs (RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add format function for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 11:34:47 +0000 (12:34 +0100)]
isisd: Add format function for SRv6 Locator TLV

Add a function to return information about an SRv6 Locator TLV and all
its Sub-TLVs (RFC 9352 section #7.1).

Examples:

r1# show isis database detail
Area 1:
IS-IS Level-1 link-state database:
LSP ID                  PduLen  SeqNumber   Chksum  Holdtime  ATT/P/OL
r1.00-00             *    248   0x00000005  0xda6e     824    0/0/0
[...]
  SRv6 Locator: fc00:0:1::/48 (Metric: 0) standard
    Sub-TLVs:
[...]

r1# show isis database detail json
[...]
              "srv6-locator":{
                "mt-id":0,
                "prefix":"fc00:0:1::/48",
                "metric":0,
                "d-flag":"",
                "algorithm":0,
                "mt-name":"standard",
                "subtlvs":{

                }
              }
[...]

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Copy SRv6 Locator TLV when copying TLVs
Carmine Scarpitta [Fri, 17 Feb 2023 23:19:07 +0000 (00:19 +0100)]
isisd: Copy SRv6 Locator TLV when copying TLVs

Extend generic TLVs copy function to copy SRv6 Locator TLVs (RFC 9352
section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add copy function for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 10:08:07 +0000 (11:08 +0100)]
isisd: Add copy function for SRv6 Locator TLV

Add a function to copy an SRv6 Locator TLV (RFC 9352 section #7.1).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 SID Struct Sub-Sub-TLV Codepoint
Carmine Scarpitta [Fri, 27 Jan 2023 14:34:41 +0000 (15:34 +0100)]
isisd: Add SRv6 SID Struct Sub-Sub-TLV Codepoint

Add the `IS-IS SRv6 SID Structure Sub-Sub-TLV Codepoint` as defined in the
`IS-IS Sub-Sub-TLVs for SRv6 SID Sub-TLVs` IANA registry. This codepoint
will be used as the Sub-Sub-TLV Type to advertise the SRv6 SID Structure
Sub-Sub-TLV in the SRv6 End SID, SRv6 End.X SID, and SRv6 LAN End.X SID
Sub-TLVs.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add IS-IS SRv6 End SID Sub-TLV Codepoint
Carmine Scarpitta [Fri, 27 Jan 2023 12:26:54 +0000 (13:26 +0100)]
isisd: Add IS-IS SRv6 End SID Sub-TLV Codepoint

Add the `IS-IS SRv6 End SID Sub-TLV Codepoint` as defined in the
`IS-IS Sub-TLVs for TLVs Advertising Prefix Reachability` IANA registry.
This codepoint will be used as the Sub-TLV
Type to advertise the SRv6 End SID Sub-TLV in the SRv6 Locator TLV.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Extend SPF algo to process SRv6 locator
Carmine Scarpitta [Wed, 22 Feb 2023 09:27:15 +0000 (10:27 +0100)]
isisd: Extend SPF algo to process SRv6 locator

Extend SPF algorithm to process SRv6 locator.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 Cap to Router Cap TLV format func
Carmine Scarpitta [Fri, 3 Mar 2023 21:29:10 +0000 (22:29 +0100)]
isisd: Add SRv6 Cap to Router Cap TLV format func

Extend Router Capabilities TLV format function to return information
about SRv6 Capabilities Sub-TLVs (RFC 9352 section #2).

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add context value for SRv6 Locator TLV
Carmine Scarpitta [Tue, 14 Feb 2023 11:21:19 +0000 (12:21 +0100)]
isisd: Add context value for SRv6 Locator TLV

Add a new TLV context value for the SRv6 Locator TLV. It will be needed
to support unpacking of the Sub-TLVs of the SRv6 Locator TLV in future
commits.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add SRv6 Locator TLV data structure
Carmine Scarpitta [Tue, 21 Feb 2023 23:03:49 +0000 (00:03 +0100)]
isisd: Add SRv6 Locator TLV data structure

Add a data structure to represent an SRv6 Locator TLV as per RFC 9352
section #7.1.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add IS-IS SRv6 Locator TLV Codepoint
Carmine Scarpitta [Fri, 27 Jan 2023 14:47:16 +0000 (15:47 +0100)]
isisd: Add IS-IS SRv6 Locator TLV Codepoint

Add IS-IS SRv6 Locator TLV Codepoint as defined in the IANA registry
IS-IS Top-Level TLV Codepoints.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Remove SRv6 End SIDs after locator unset
Carmine Scarpitta [Tue, 13 Jun 2023 11:09:57 +0000 (13:09 +0200)]
isisd: Remove SRv6 End SIDs after locator unset

When an SRv6 locator is unset, remove all the SRv6 End SIDs allocated
from that locator.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Install SRv6 End SID automatically
Carmine Scarpitta [Wed, 22 Feb 2023 10:20:50 +0000 (11:20 +0100)]
isisd: Install SRv6 End SID automatically

When zebra assigns a chunk to IS-IS, zebra sends a
ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK notification to IS-IS.
IS-IS invokes the `isis_zebra_process_srv6_locator_chunk()` callback to
process the received notification.

Actually, `isis_zebra_process_srv6_locator_chunk()` iterates over all
areas of the current IS-IS instance and looks for an area for which the
received chunk was requested.
If a match is found, the new chunk is added to the area's chunk list and
`lsp_regenerate_schedule()` is called to regenerate the LSPs to
advertise the new SRv6 locator.

This commit extends the `isis_zebra_process_srv6_locator_chunk()`
function to automatically allocate an SRv6 End SID from the received
chunk and install it in the data plane.

The SRv6 End SID is the instantiation of a Prefix-SID (RFC 8986 section

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add func to remove SRv6 SID from dplane
Carmine Scarpitta [Wed, 22 Feb 2023 10:19:28 +0000 (11:19 +0100)]
isisd: Add func to remove SRv6 SID from dplane

Add a function to remove an SRv6 SID from the data plane through
zebra.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add func to install SRv6 SID in dplane
Carmine Scarpitta [Wed, 22 Feb 2023 10:18:46 +0000 (11:18 +0100)]
isisd: Add func to install SRv6 SID in dplane

Add a function to install an SRv6 SID in the data plane through
zebra.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Add function to send SRv6 SID to zebra
Carmine Scarpitta [Sat, 3 Jun 2023 06:39:33 +0000 (08:39 +0200)]
isisd: Add function to send SRv6 SID to zebra

Add a function to install/remove an SRv6 SID in the forwarding plane
through Zebra.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoisisd: Uninstall routes only if installed
Carmine Scarpitta [Sat, 10 Jun 2023 07:30:17 +0000 (09:30 +0200)]
isisd: Uninstall routes only if installed

In some cases, IS-IS may attempt to remove routes that have not been
installed before. We can prevent IS-IS from doing this by aborting
`isis_zebra_route_del_route` when the ISIS_ROUTE_FLAG_ZEBRA_SYNCED flag
is unset, meaning that the route is not installed in the kernel.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: Encode SRv6 flavors in Netlink messages
Carmine Scarpitta [Mon, 20 Mar 2023 21:32:01 +0000 (22:32 +0100)]
zebra: Encode SRv6 flavors in Netlink messages

Encode SRv6 flavors information when building a seg6local nexthop.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: Resolve default values for SRv6 flavor attr
Carmine Scarpitta [Mon, 20 Mar 2023 20:53:49 +0000 (21:53 +0100)]
zebra: Resolve default values for SRv6 flavor attr

When zebra receives a Netlink message containing a seg6local nexthop,
let's use the default values for optional attributes `lcblock_len` and
`lcnode_fn_len`, if they are not specified.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: Resolve default values for SRv6 flavor attr
Carmine Scarpitta [Mon, 20 Mar 2023 20:49:07 +0000 (21:49 +0100)]
zebra: Resolve default values for SRv6 flavor attr

When zebra receives a Netlink message containing a seg6local nexthop,
let's use the default values for optional attributes `lcblock_len` and
`lcnode_fn_len`, if they are not specified.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agolib: Define default values for SRv6 flavors attrs
Carmine Scarpitta [Mon, 20 Mar 2023 20:48:27 +0000 (21:48 +0100)]
lib: Define default values for SRv6 flavors attrs

When installing a local SID in the Linux kernel, `lcblock_len` and
`lcnode_fn_len` Netlink attributes are optional. When omitted, the
kernel uses the default values: lcblock_len=32 and lcnode_fn_len=16.
Let's use the same default values in FRR.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agozebra: Extend `rt_netlink.c` to parse SRv6 flavors
Carmine Scarpitta [Mon, 20 Mar 2023 20:35:04 +0000 (21:35 +0100)]
zebra: Extend `rt_netlink.c` to parse SRv6 flavors

Extend the `parse_encap_seg6local` function to parse SRv6 flavors
information contained in the Netlink message.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>