Merge pull request #13617 from anlancs/fix/pimd-remove-pimreg-vrf

pimd: Fix missing pimreg interface
This commit is contained in:
mobash-rasool 2023-10-10 22:10:24 +05:30 committed by GitHub
commit 9b6f41bfbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1500,9 +1500,16 @@ void pim_if_create_pimreg(struct pim_instance *pim)
pim->vrf->name);
pim->regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF;
if (!pim->regiface->info)
pim_if_new(pim->regiface, false, false, true,
false /*vxlan_term*/);
/*
* The pimreg interface might has been removed from
* kerenl with the VRF's deletion. It must be
* recreated, so delete the old one first.
*/
if (pim->regiface->info)
pim_if_delete(pim->regiface);
pim_if_new(pim->regiface, false, false, true,
false /*vxlan_term*/);
/*
* On vrf moves we delete the interface if there