]> git.puffer.fish Git - matthieu/frr.git/commitdiff
nhrpd: fixes core dump on shutdown
authordleroy <dleroy@labn.net>
Mon, 29 Apr 2024 16:40:21 +0000 (09:40 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 30 May 2024 23:28:54 +0000 (23:28 +0000)
When nhrpd is shutdown via nhrp_request_stop() the shutdown
sequence was not handling the case where there are active
shortcut routes installed. The zebra client and shortcut rib
were being cleaned up before vrf_terminate() had an opportunity
to delete the active routes.

Signed-off-by: dleroy <dleroy@labn.net>
(cherry picked from commit a4ee9762734332697ba186ae7223da1eb0445cb2)

nhrpd/nhrp_main.c

index adb8be36d303cfd0967c7a316c00d5752b36b82f..5d492249d32c41942fcd2b9756d2f5270eeac684 100644 (file)
@@ -83,13 +83,13 @@ static void nhrp_request_stop(void)
        debugf(NHRP_DEBUG_COMMON, "Exiting...");
        frr_early_fini();
 
-       nhrp_shortcut_terminate();
+       vrf_terminate();
        nhrp_nhs_terminate();
        nhrp_zebra_terminate();
        vici_terminate();
        evmgr_terminate();
-       vrf_terminate();
        nhrp_vc_terminate();
+       nhrp_shortcut_terminate();
 
        debugf(NHRP_DEBUG_COMMON, "Done.");