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 <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2018-12-05 17:54:57 +01:00
parent ad31e8d398
commit 0768f289e0
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -7963,5 +7963,4 @@ void bgp_terminate(void)
if (bm->t_rmap_update)
BGP_TIMER_OFF(bm->t_rmap_update);
bgp_lp_finish();
}