summaryrefslogtreecommitdiffstats
path: root/lib/vrf.h
diff options
context:
space:
mode:
authorAlexander Skorichenko <askorichenko@netgate.com>2024-02-28 20:34:06 +0100
committerAlexander Skorichenko <askorichenko@netgate.com>2024-03-15 11:42:02 +0100
commit444ce317b2af491b5cdc321286772627a5d4c8ea (patch)
treef30ba4b95ab164d8b5e2a33a99d43217c2564929 /lib/vrf.h
parentMerge pull request #15545 from donaldsharp/bgp_attr_dump (diff)
downloadfrr-444ce317b2af491b5cdc321286772627a5d4c8ea.tar.xz
frr-444ce317b2af491b5cdc321286772627a5d4c8ea.zip
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 <askorichenko@netgate.com>
Diffstat (limited to 'lib/vrf.h')
-rw-r--r--lib/vrf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/vrf.h b/lib/vrf.h
index 4277a51bb..3ebb6ddf5 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -202,6 +202,12 @@ extern void vrf_init(int (*create)(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
*/
extern void vrf_terminate(void);