diff options
author | Alexander Skorichenko <askorichenko@netgate.com> | 2024-02-28 20:34:06 +0100 |
---|---|---|
committer | Alexander Skorichenko <askorichenko@netgate.com> | 2024-03-15 11:42:02 +0100 |
commit | 444ce317b2af491b5cdc321286772627a5d4c8ea (patch) | |
tree | f30ba4b95ab164d8b5e2a33a99d43217c2564929 /zebra/main.c | |
parent | Merge pull request #15545 from donaldsharp/bgp_attr_dump (diff) | |
download | frr-444ce317b2af491b5cdc321286772627a5d4c8ea.tar.xz frr-444ce317b2af491b5cdc321286772627a5d4c8ea.zip |
zebra: fix route deletion during zebra shutdown
Split zebra's vrf_terminate() into disable() and delete() stages.
The former enqueues all events for the dplane thread.
Memory freeing is performed in the second stage.
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/main.c b/zebra/main.c index 27e98ed99..d83f1d049 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -205,6 +205,12 @@ static void sigint(void) list_delete(&zrouter.client_list); list_delete(&zrouter.stale_client_list); + /* + * Besides other clean-ups zebra's vrf_disable() also enqueues installed + * routes for removal from the kernel, unless ZEBRA_VRF_RETAIN is set. + */ + vrf_iterate(vrf_disable); + /* Indicate that all new dplane work has been enqueued. When that * work is complete, the dataplane will enqueue an event * with the 'finalize' function. |