mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 04:54:44 +00:00
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>
This commit is contained in:
parent
71b8056d6d
commit
a1be1942f5
@ -1262,6 +1262,8 @@ static int isis_zebra_process_srv6_locator_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
struct isis_area *area;
|
struct isis_area *area;
|
||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
struct srv6_locator_chunk *chunk;
|
struct srv6_locator_chunk *chunk;
|
||||||
|
struct isis_srv6_sid *sid;
|
||||||
|
struct srv6_adjacency *sra;
|
||||||
|
|
||||||
/* Decode the received zebra message */
|
/* Decode the received zebra message */
|
||||||
if (zapi_srv6_locator_decode(zclient->ibuf, &loc) < 0)
|
if (zapi_srv6_locator_decode(zclient->ibuf, &loc) < 0)
|
||||||
@ -1280,6 +1282,28 @@ static int isis_zebra_process_srv6_locator_delete(ZAPI_CALLBACK_ARGS)
|
|||||||
sizeof(area->srv6db.config.srv6_locator_name)) != 0)
|
sizeof(area->srv6db.config.srv6_locator_name)) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* Delete SRv6 SIDs */
|
||||||
|
for (ALL_LIST_ELEMENTS(area->srv6db.srv6_sids, node, nnode,
|
||||||
|
sid)) {
|
||||||
|
|
||||||
|
sr_debug(
|
||||||
|
"Deleting SRv6 SID (locator %s, sid %pI6) from IS-IS area %s",
|
||||||
|
area->srv6db.config.srv6_locator_name,
|
||||||
|
&sid->sid, area->area_tag);
|
||||||
|
|
||||||
|
/* Uninstall the SRv6 SID from the forwarding plane
|
||||||
|
* through Zebra */
|
||||||
|
isis_zebra_srv6_sid_uninstall(area, sid);
|
||||||
|
|
||||||
|
listnode_delete(area->srv6db.srv6_sids, sid);
|
||||||
|
isis_srv6_sid_free(sid);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Uninstall all local Adjacency-SIDs. */
|
||||||
|
for (ALL_LIST_ELEMENTS(area->srv6db.srv6_endx_sids, node, nnode,
|
||||||
|
sra))
|
||||||
|
srv6_endx_sid_del(sra);
|
||||||
|
|
||||||
/* Free the SRv6 locator chunks */
|
/* Free the SRv6 locator chunks */
|
||||||
for (ALL_LIST_ELEMENTS(area->srv6db.srv6_locator_chunks, node,
|
for (ALL_LIST_ELEMENTS(area->srv6db.srv6_locator_chunks, node,
|
||||||
nnode, chunk)) {
|
nnode, chunk)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user