Merge pull request #13739 from donaldsharp/zebra_dplane_crash

zebra: Prevent crash because nl is NULL on shutdown
This commit is contained in:
Jafar Al-Gharaibeh 2023-06-08 23:44:55 -05:00 committed by GitHub
commit d908ec51de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);