summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2023-06-08 23:44:55 -0500
committerGitHub <noreply@github.com>2023-06-08 23:44:55 -0500
commitd908ec51de6aa9f352d4b52dd6b030b5bde14303 (patch)
treeccac5738c03f68953515a3f21e3c9ddaf11af647
parente631541b6860571ba1644b5ea366c6d1de71fbb9 (diff)
parent977d7e24fff4e0eef4426bbcc32e491a60815b89 (diff)
Merge pull request #13739 from donaldsharp/zebra_dplane_crash
zebra: Prevent crash because nl is NULL on shutdown
-rw-r--r--zebra/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/zebra/main.c b/zebra/main.c
index 81a3066445..bd4623be55 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -206,12 +206,17 @@ void zebra_finalize(struct event *dummy)
vrf_terminate();
+ /*
+ * Stop dplane thread and finish any cleanup
+ * This is before the zebra_ns_early_shutdown call
+ * because sockets that the dplane depends on are closed
+ * in those functions
+ */
+ zebra_dplane_shutdown();
+
ns_walk_func(zebra_ns_early_shutdown, NULL, NULL);
zebra_ns_notify_close();
- /* Stop dplane thread and finish any cleanup */
- zebra_dplane_shutdown();
-
/* Final shutdown of ns resources */
ns_walk_func(zebra_ns_final_shutdown, NULL, NULL);