diff --git a/pimd/pim_vxlan.c b/pimd/pim_vxlan.c index 95b108ba67..cce6cfd793 100644 --- a/pimd/pim_vxlan.c +++ b/pimd/pim_vxlan.c @@ -1158,3 +1158,8 @@ void pim_vxlan_exit(struct pim_instance *pim) pim->vxlan.sg_hash = NULL; } } + +void pim_vxlan_terminate(void) +{ + pim_vxlan_work_timer_setup(false); +} diff --git a/pimd/pim_vxlan.h b/pimd/pim_vxlan.h index 198d1c3281..18f1b74175 100644 --- a/pimd/pim_vxlan.h +++ b/pimd/pim_vxlan.h @@ -148,4 +148,6 @@ extern bool pim_vxlan_do_mlag_reg(void); extern void pim_vxlan_inherit_mlag_flags(struct pim_instance *pim, struct pim_upstream *up, bool inherit); +/* Shutdown of PIM stop the thread */ +extern void pim_vxlan_terminate(void); #endif /* PIM_VXLAN_H */ diff --git a/pimd/pimd.c b/pimd/pimd.c index a2af66fdc7..f008109ebf 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -39,6 +39,7 @@ #include "pim_static.h" #include "pim_rp.h" #include "pim_ssm.h" +#include "pim_vxlan.h" #include "pim_zlookup.h" #include "pim_zebra.h" @@ -133,6 +134,7 @@ void pim_terminate(void) prefix_list_delete_hook(NULL); prefix_list_reset(); + pim_vxlan_terminate(); pim_vrf_terminate(); zclient = pim_zebra_zclient_get();