]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: fix assert mpls when terminating zebra
authorPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 24 Jan 2018 18:06:06 +0000 (19:06 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 27 Feb 2018 10:11:24 +0000 (11:11 +0100)
The assert appears in zebra_mpls.c when checking default zebra_vrf.
It appears that when the mpls entries are flushed, it gets the default
vrf which is already flushed by vrf_terminate() function. In order to
avoid that assert to trigger a crash, the mpls flush is called before
vrf termination.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra/main.c

index 335329081617a52550a463804270d6631dc63cc0..9cad913f4bef95ccc066893f27fb538ecd662487 100644 (file)
@@ -138,6 +138,8 @@ static void sigint(void)
                        if (zvrf)
                                SET_FLAG(zvrf->flags, ZEBRA_VRF_RETAIN);
                }
+       if (zebrad.lsp_process_q)
+               work_queue_free(zebrad.lsp_process_q);
        vrf_terminate();
 
        ns_walk_func(zebra_ns_disabled);
@@ -149,8 +151,6 @@ static void sigint(void)
 
        list_delete_and_null(&zebrad.client_list);
        work_queue_free(zebrad.ribq);
-       if (zebrad.lsp_process_q)
-               work_queue_free(zebrad.lsp_process_q);
        meta_queue_free(zebrad.mq);
 
        frr_fini();