]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Add SRv6 SIDs to SRv6 configuration
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Thu, 2 Feb 2023 11:32:10 +0000 (12:32 +0100)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:00 +0000 (17:35 +0200)
Add the list of SRv6 SIDs allocated by the IS-IS instance to the per-area
SRv6 configuration. The list is area-specific. Each IS-IS area has its
own SRv6 SIDs list. The list is initialized when an IS-IS area is
created and freed when an IS-IS area is destroyed.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
isisd/isis_srv6.c
isisd/isis_srv6.h

index 8ae7963941d86183bbcf8c32e167e52ec3fffbe4..7ef8e960c0534b1e101161b6970c25be4dedfd79 100644 (file)
@@ -185,6 +185,10 @@ void isis_srv6_area_init(struct isis_area *area)
 
        /* Initialize SRv6 Locator chunks list */
        srv6db->srv6_locator_chunks = list_new();
+
+       /* Initialize SRv6 SIDs list */
+       srv6db->srv6_sids = list_new();
+       srv6db->srv6_sids->del = (void (*)(void *))isis_srv6_sid_free;
 }
 
 /**
@@ -204,6 +208,9 @@ void isis_srv6_area_term(struct isis_area *area)
        for (ALL_LIST_ELEMENTS(srv6db->srv6_locator_chunks, node, nnode, chunk))
                srv6_locator_chunk_free(&chunk);
        list_delete(&srv6db->srv6_locator_chunks);
+
+       /* Free SRv6 SIDs list */
+       list_delete(&srv6db->srv6_sids);
 }
 
 /**
index 8d8752192cfbe50346c4a941ee4d7112c6230a74..270627a166816374ed26104de778320f6a104a44 100644 (file)
@@ -55,6 +55,9 @@ struct isis_srv6_db {
        /* List of SRv6 Locator chunks */
        struct list *srv6_locator_chunks;
 
+       /* List of SRv6 SIDs allocated by the IS-IS instance */
+       struct list *srv6_sids;
+
        /* Area SRv6 configuration. */
        struct {
                /* Administrative status of SRv6 */