summaryrefslogtreecommitdiff
path: root/pimd/pim_iface.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-03-02 08:14:35 +0200
committerGitHub <noreply@github.com>2023-03-02 08:14:35 +0200
commit0e957d006a44558e5b11becbaad66f792dc80ee2 (patch)
tree26098b427153df83b61eae286538ddb042b8e7c7 /pimd/pim_iface.c
parent001ca23944578411da4f2742b64ea7d404fc7c10 (diff)
parent7ae7a3bfd6043bcb0124c730cd04b9a37a2df21e (diff)
Merge pull request #12921 from donaldsharp/pim_regiface_crash
pimd: Prevent crash when pimreg already exists.
Diffstat (limited to 'pimd/pim_iface.c')
-rw-r--r--pimd/pim_iface.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index 0ba7b5a65e..d284912d1d 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -1534,8 +1534,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