mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
pbrd: Cleanup zclient on shutdown
For some reason pbrd had no shutdown code for zclient. Now it does. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
5dcd9f65e3
commit
0e44d248a0
|
@ -71,6 +71,8 @@ static void sigint(void)
|
|||
|
||||
pbr_vrf_terminate();
|
||||
|
||||
pbr_zebra_destroy();
|
||||
|
||||
frr_fini();
|
||||
|
||||
exit(0);
|
||||
|
|
|
@ -419,6 +419,16 @@ void pbr_zebra_init(void)
|
|||
zclient->zebra_connected = zebra_connected;
|
||||
}
|
||||
|
||||
void pbr_zebra_destroy(void)
|
||||
{
|
||||
if (zclient == NULL)
|
||||
return;
|
||||
|
||||
zclient_stop(zclient);
|
||||
zclient_free(zclient);
|
||||
zclient = NULL;
|
||||
}
|
||||
|
||||
void pbr_send_rnh(struct nexthop *nhop, bool reg)
|
||||
{
|
||||
uint32_t command;
|
||||
|
|
|
@ -14,6 +14,7 @@ struct pbr_interface {
|
|||
extern struct event_loop *master;
|
||||
|
||||
extern void pbr_zebra_init(void);
|
||||
extern void pbr_zebra_destroy(void);
|
||||
|
||||
extern void route_add(struct pbr_nexthop_group_cache *pnhgc,
|
||||
struct nexthop_group nhg, afi_t install_afi);
|
||||
|
|
Loading…
Reference in a new issue