diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-02-02 12:32:10 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 17:35:00 +0200 |
| commit | 26d7806d20565a1faf5e6d470d5b4a62bf129827 (patch) | |
| tree | 9000205572ca9c52d0003605db1bb0ac2067589e /isisd/isis_srv6.c | |
| parent | f6238e10b025a2de3200f5050471e10546da065c (diff) | |
isisd: Add SRv6 SIDs to SRv6 configuration
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>
Diffstat (limited to 'isisd/isis_srv6.c')
| -rw-r--r-- | isisd/isis_srv6.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/isisd/isis_srv6.c b/isisd/isis_srv6.c index 8ae7963941..7ef8e960c0 100644 --- a/isisd/isis_srv6.c +++ b/isisd/isis_srv6.c @@ -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); } /** |
