mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
lib: Handle configured VRFs at termination
When shutting down, ensure that all VRFs including "configured" ones are cleaned up properly. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-19069 Reviewed By: CCR-7011 Testing Done: Manual verification of failed scenario
This commit is contained in:
parent
2f69f6d368
commit
65c3a7c4e5
10
lib/vrf.c
10
lib/vrf.c
@ -419,10 +419,16 @@ void vrf_terminate(void)
|
|||||||
zlog_debug("%s: Shutting down vrf subsystem",
|
zlog_debug("%s: Shutting down vrf subsystem",
|
||||||
__PRETTY_FUNCTION__);
|
__PRETTY_FUNCTION__);
|
||||||
|
|
||||||
while ((vrf = RB_ROOT(vrf_id_head, &vrfs_by_id)) != NULL)
|
while ((vrf = RB_ROOT(vrf_id_head, &vrfs_by_id)) != NULL) {
|
||||||
|
/* Clear configured flag and invoke delete. */
|
||||||
|
UNSET_FLAG(vrf->status, VRF_CONFIGURED);
|
||||||
vrf_delete(vrf);
|
vrf_delete(vrf);
|
||||||
while ((vrf = RB_ROOT(vrf_name_head, &vrfs_by_name)) != NULL)
|
}
|
||||||
|
while ((vrf = RB_ROOT(vrf_name_head, &vrfs_by_name)) != NULL) {
|
||||||
|
/* Clear configured flag and invoke delete. */
|
||||||
|
UNSET_FLAG(vrf->status, VRF_CONFIGURED);
|
||||||
vrf_delete(vrf);
|
vrf_delete(vrf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a socket for the VRF. */
|
/* Create a socket for the VRF. */
|
||||||
|
Loading…
Reference in New Issue
Block a user