mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
isisd: Add SRv6 locator chunks to SRv6 config
Add a list of SRv6 locator chunks allocated to a specific IS-IS area. The list is initialized when the IS-IS area is created and freed when the IS-IS area is destroyed. Subsequent commits will introduce the possibility to allocate and release locator chunks. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
1a9c3a1e57
commit
2e8d254ac7
@ -9,6 +9,7 @@
|
||||
|
||||
#include <zebra.h>
|
||||
|
||||
#include "srv6.h"
|
||||
#include "termtable.h"
|
||||
|
||||
#include "isisd/isisd.h"
|
||||
@ -124,6 +125,9 @@ void isis_srv6_area_init(struct isis_area *area)
|
||||
srv6db->config.max_end_pop_msd = SRV6_MAX_END_POP;
|
||||
srv6db->config.max_h_encaps_msd = SRV6_MAX_H_ENCAPS;
|
||||
srv6db->config.max_end_d_msd = SRV6_MAX_END_D;
|
||||
|
||||
/* Initialize SRv6 Locator chunks list */
|
||||
srv6db->srv6_locator_chunks = list_new();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,7 +137,16 @@ void isis_srv6_area_init(struct isis_area *area)
|
||||
*/
|
||||
void isis_srv6_area_term(struct isis_area *area)
|
||||
{
|
||||
struct isis_srv6_db *srv6db = &area->srv6db;
|
||||
struct listnode *node, *nnode;
|
||||
struct srv6_locator_chunk *chunk;
|
||||
|
||||
sr_debug("ISIS-SRv6 (%s): Terminate SRv6", area->area_tag);
|
||||
|
||||
/* Free SRv6 Locator chunks list */
|
||||
for (ALL_LIST_ELEMENTS(srv6db->srv6_locator_chunks, node, nnode, chunk))
|
||||
srv6_locator_chunk_free(&chunk);
|
||||
list_delete(&srv6db->srv6_locator_chunks);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,6 +19,9 @@
|
||||
/* Per-area IS-IS SRv6 Data Base (SRv6 DB) */
|
||||
struct isis_srv6_db {
|
||||
|
||||
/* List of SRv6 Locator chunks */
|
||||
struct list *srv6_locator_chunks;
|
||||
|
||||
/* Area SRv6 configuration. */
|
||||
struct {
|
||||
/* Administrative status of SRv6 */
|
||||
|
Loading…
Reference in New Issue
Block a user