The nl batch buffer was destroyed too early when a netns was
terminated. Now freeing the buffer later in router_terminate allows
netlink messages to be still processed.
Signed-off-by: Christopher Dziomba <christopher.dziomba@telekom.de>
/* During zebra shutdown, we need to leave the dataplane socket
* around until all work is done.
*/
- if (complete) {
+ if (complete)
kernel_nlsock_fini(&zns->netlink_dplane_out);
-
- XFREE(MTYPE_NL_BUF, nl_batch_tx_buf);
- }
}
/*
*/
void kernel_router_terminate(void)
{
+ XFREE(MTYPE_NL_BUF, nl_batch_tx_buf);
+
pthread_mutex_destroy(&nlsock_mutex);
hash_free(nlsock_hash);