summaryrefslogtreecommitdiffstats
path: root/ripd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-11-12 04:55:00 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-11-13 15:16:45 +0100
commitc0dc9d329ff7b3353fe0c6424a4ae84aac4b9da2 (patch)
treeaf23c8fef82b566ae4984f2b5a3f7b7de2550185 /ripd
parentbabeld: Cleanup vrf data structures on shutdown (diff)
downloadfrr-c0dc9d329ff7b3353fe0c6424a4ae84aac4b9da2.tar.xz
frr-c0dc9d329ff7b3353fe0c6424a4ae84aac4b9da2.zip
ripd: Cleanup memory on shutdown
a) routemap data was not being cleaned up b) rip data structure was not being cleaned up Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index ac358ebba..3f52bebe9 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -67,12 +67,24 @@ static void sighup(void)
/* SIGINT handler. */
static void sigint(void)
{
+ struct vrf *vrf;
+
zlog_notice("Terminating on signal");
bfd_protocol_integration_set_shutdown(true);
+
+ RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
+ if (!vrf->info)
+ continue;
+
+ rip_clean(vrf->info);
+ }
+
rip_vrf_terminate();
if_rmap_terminate();
rip_zclient_stop();
+
+ route_map_finish();
frr_fini();
exit(0);