Skip to content

Commit

Permalink
ospfd: Stop and free synchronous Zebra client on OSPF termination
Browse files Browse the repository at this point in the history
Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jun 26, 2023
1 parent 4262dc3 commit a9c81cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ospfd/ospf_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions ospfd/ospfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a9c81cc

Please sign in to comment.