Merge pull request #12926 from FRRouting/mergify/bp/dev/8.5/pr-12921

pimd: Prevent crash when pimreg already exists. (backport #12921)
This commit is contained in:
Donatas Abraitis 2023-03-02 11:21:04 +02:00 committed by GitHub
commit 0a9a5c38b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1546,8 +1546,10 @@ void pim_if_create_pimreg(struct pim_instance *pim)
pim->vrf->name);
pim->regiface->ifindex = PIM_OIF_PIM_REGISTER_VIF;
pim_if_new(pim->regiface, false, false, true,
false /*vxlan_term*/);
if (!pim->regiface->info)
pim_if_new(pim->regiface, false, false, true,
false /*vxlan_term*/);
/*
* On vrf moves we delete the interface if there
* is nothing going on with it. We cannot have