isisd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-06-30 10:31:09 -04:00
parent edaf6c016f
commit 8d429559df
3 changed files with 10 additions and 0 deletions

View File

@ -101,6 +101,7 @@ void sigusr1(void);
static __attribute__((__noreturn__)) void static __attribute__((__noreturn__)) void
terminate (int i) terminate (int i)
{ {
isis_zebra_stop ();
exit (i); exit (i);
} }

View File

@ -720,3 +720,10 @@ isis_zebra_init (struct thread_master *master)
return; return;
} }
void
isis_zebra_stop (void)
{
zclient_stop (zclient);
zclient_free (zclient);
}

View File

@ -25,6 +25,8 @@
extern struct zclient *zclient; extern struct zclient *zclient;
void isis_zebra_init(struct thread_master *); void isis_zebra_init(struct thread_master *);
void isis_zebra_stop(void);
void isis_zebra_route_update (struct prefix *prefix, void isis_zebra_route_update (struct prefix *prefix,
struct isis_route_info *route_info); struct isis_route_info *route_info);
int isis_distribute_list_update (int routetype); int isis_distribute_list_update (int routetype);