From dd9538c5f36f9d6110f1465b8708d0d7529f2cc7 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Fri, 12 Nov 2021 15:10:00 -0500 Subject: [PATCH] zebra: free LSP workqueue later during shutdown Free the LSP workqueue later during shutdown, so that zebra has enough time to clean up and uninstall any LSPs. Signed-off-by: Mark Stapp --- zebra/main.c | 2 -- zebra/zebra_router.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zebra/main.c b/zebra/main.c index 6162d36b43..cca7b49962 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -182,8 +182,6 @@ static void sigint(void) SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN); } } - if (zrouter.lsp_process_q) - work_queue_free_and_null(&zrouter.lsp_process_q); vrf_terminate(); diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index a80c573855..4ce756c953 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -235,6 +235,9 @@ void zebra_router_terminate(void) RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp) zebra_router_free_table(zrt); + if (zrouter.lsp_process_q) + work_queue_free_and_null(&zrouter.lsp_process_q); + work_queue_free_and_null(&zrouter.ribq); meta_queue_free(zrouter.mq); -- 2.39.5