From 444ce317b2af491b5cdc321286772627a5d4c8ea Mon Sep 17 00:00:00 2001 From: Alexander Skorichenko Date: Wed, 28 Feb 2024 20:34:06 +0100 Subject: zebra: fix route deletion during zebra shutdown Split zebra's vrf_terminate() into disable() and delete() stages. The former enqueues all events for the dplane thread. Memory freeing is performed in the second stage. Signed-off-by: Alexander Skorichenko --- lib/vrf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/vrf.h') diff --git a/lib/vrf.h b/lib/vrf.h index 4277a51bb..3ebb6ddf5 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -201,6 +201,12 @@ extern void vrf_init(int (*create)(struct vrf *vrf), int (*disable)(struct vrf *vrf), int (*destroy)(struct vrf *vrf)); +/* + * Iterate over custom VRFs and round up by processing the default VRF. + */ +typedef void (*vrf_iter_func)(struct vrf *vrf); +extern void vrf_iterate(vrf_iter_func fnc); + /* * Call vrf_terminate when the protocol is being shutdown */ -- cgit v1.2.3