When shutting down the vrf don't kill the default vrf
when attempting to cleanup something else.
Also move the terminate to the right spot.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pim_msdp_exit(pim);
- XFREE(MTYPE_PIM_PIM_INSTANCE, pimg);
+ XFREE(MTYPE_PIM_PIM_INSTANCE, pim);
}
static struct pim_instance *pim_instance_init(struct vrf *vrf)
zlog_debug("VRF Deletion: %s(%d)", vrf->name, vrf->vrf_id);
pim_ssmpingd_destroy(pim);
+ pim_instance_terminate(pim);
return 0;
}
static int pim_vrf_disable(struct vrf *vrf)
{
- pim_instance_terminate((struct pim_instance *)vrf->info);
-
/* Note: This is a callback, the VRF will be deleted by the caller. */
return 0;
}