summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-11-15 17:51:51 +0200
committerGitHub <noreply@github.com>2021-11-15 17:51:51 +0200
commit2247d05efedd9d2c1dceb1ed2d4addf9a7f403a3 (patch)
tree7363894ba30bf8c2147de898b88de525be57962f
parentf0946fe04d3593b1072b6e0d755b2d8d38ba2761 (diff)
parentdd9538c5f36f9d6110f1465b8708d0d7529f2cc7 (diff)
Merge pull request #10050 from mjstapp/fix_mpls_queue_cleanup
zebra: free LSP workqueue later during shutdown
-rw-r--r--zebra/main.c2
-rw-r--r--zebra/zebra_router.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/zebra/main.c b/zebra/main.c
index e4363bd899..038022ceb2 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);