From 0768f289e09e309ad6b5c0ac4c92dd71246eb3ed Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Wed, 5 Dec 2018 17:54:57 +0100 Subject: [PATCH] bgpd: delay destruction of label pool label pool finalisation must be delayed after route deletion on bgp. otherwise a crash will happen, while labels will be released. Signed-off-by: Philippe Guibert --- bgpd/bgp_main.c | 3 +++ bgpd/bgpd.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index f8ff4f2f07..47e7c1686f 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -235,6 +235,9 @@ static __attribute__((__noreturn__)) void bgp_exit(int status) bf_free(bm->rd_idspace); list_delete(&bm->bgp); + + bgp_lp_finish(); + memset(bm, 0, sizeof(*bm)); frr_fini(); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 94cb285a03..d6be3228fe 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7963,5 +7963,4 @@ void bgp_terminate(void) if (bm->t_rmap_update) BGP_TIMER_OFF(bm->t_rmap_update); - bgp_lp_finish(); } -- 2.39.5