mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
Merge pull request #10080 from mjstapp/fix_lsp_workqueue
zebra: ignore workqueue delete callbacks during shutdown
This commit is contained in:
commit
31ffc82f65
@ -183,6 +183,9 @@ static void sigint(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (zrouter.lsp_process_q)
|
||||||
|
work_queue_free_and_null(&zrouter.lsp_process_q);
|
||||||
|
|
||||||
vrf_terminate();
|
vrf_terminate();
|
||||||
|
|
||||||
ns_walk_func(zebra_ns_early_shutdown, NULL, NULL);
|
ns_walk_func(zebra_ns_early_shutdown, NULL, NULL);
|
||||||
|
@ -1037,6 +1037,16 @@ static void lsp_processq_del(struct work_queue *wq, void *data)
|
|||||||
struct zebra_lsp *lsp;
|
struct zebra_lsp *lsp;
|
||||||
struct hash *lsp_table;
|
struct hash *lsp_table;
|
||||||
struct zebra_nhlfe *nhlfe;
|
struct zebra_nhlfe *nhlfe;
|
||||||
|
bool in_shutdown = false;
|
||||||
|
|
||||||
|
/* If zebra is shutting down, don't delete any structs,
|
||||||
|
* just ignore this callback. The LSPs will be cleaned up
|
||||||
|
* during the shutdown processing.
|
||||||
|
*/
|
||||||
|
in_shutdown = atomic_load_explicit(&zrouter.in_shutdown,
|
||||||
|
memory_order_relaxed);
|
||||||
|
if (in_shutdown)
|
||||||
|
return;
|
||||||
|
|
||||||
zvrf = vrf_info_lookup(VRF_DEFAULT);
|
zvrf = vrf_info_lookup(VRF_DEFAULT);
|
||||||
assert(zvrf);
|
assert(zvrf);
|
||||||
|
@ -235,9 +235,6 @@ void zebra_router_terminate(void)
|
|||||||
RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
|
RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
|
||||||
zebra_router_free_table(zrt);
|
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);
|
work_queue_free_and_null(&zrouter.ribq);
|
||||||
meta_queue_free(zrouter.mq);
|
meta_queue_free(zrouter.mq);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user