summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-06-26 13:57:24 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-06-26 16:31:47 +0300
commita9c81cc289e8d40b87117e01b1416a9ac2f60f50 (patch)
tree104abd11340dcd576fedaa44730d774dce982287
parent4262dc3bd8d5407dd7af0701fadfb14bbcfbd7ea (diff)
ospfd: Stop and free synchronous Zebra client on OSPF termination
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
-rw-r--r--ospfd/ospf_zebra.c2
-rw-r--r--ospfd/ospfd.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 27d74cd4fc..8aabfc914b 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -47,7 +47,7 @@ DEFINE_MTYPE_STATIC(OSPFD, OSPF_REDISTRIBUTE, "OSPF Redistriute");
/* Zebra structure to hold current status. */
struct zclient *zclient = NULL;
/* and for the Synchronous connection to the Label Manager */
-static struct zclient *zclient_sync;
+struct zclient *zclient_sync;
/* For registering threads. */
extern struct event_loop *master;
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 51e937f42c..0922aecc37 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -60,6 +60,7 @@ struct ospf_master *om;
unsigned short ospf_instance;
extern struct zclient *zclient;
+extern struct zclient *zclient_sync;
static void ospf_remove_vls_through_area(struct ospf *, struct ospf_area *);
@@ -681,6 +682,8 @@ void ospf_terminate(void)
*/
zclient_stop(zclient);
zclient_free(zclient);
+ zclient_stop(zclient_sync);
+ zclient_free(zclient_sync);
done:
frr_fini();