Skip to content

Commit

Permalink
ldpd: Stop and free synchronous Zebra client on destroy
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 93ffc5a commit 41366da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ldpd/lde.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static struct list *label_chunk_list;
static struct listnode *current_label_chunk;

/* Synchronous zclient to request labels */
static struct zclient *zclient_sync;
struct zclient *zclient_sync;

/* SIGINT / SIGTERM handler. */
static void
Expand Down
4 changes: 4 additions & 0 deletions ldpd/ldp_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static int ldp_zebra_opaque_msg_handler(ZAPI_CALLBACK_ARGS);
static void ldp_sync_zebra_init(void);

static struct zclient *zclient;
extern struct zclient *zclient_sync;
static bool zebra_registered = false;

static void
Expand Down Expand Up @@ -703,4 +704,7 @@ ldp_zebra_destroy(void)
zclient_stop(zclient);
zclient_free(zclient);
zclient = NULL;
zclient_stop(zclient_sync);
zclient_free(zclient_sync);
zclient_sync = NULL;
}

0 comments on commit 41366da

Please sign in to comment.