summaryrefslogtreecommitdiffstats
path: root/pimd/pim_oil.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-05-14 15:46:36 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-05-19 20:48:11 +0200
commit8c70a46b650d59b2bce8190dead40aa92a6e1ef6 (patch)
tree5c852a6c2fa2393fb204175951f59fc69c254307 /pimd/pim_oil.c
parentpimd: When bind fails give some extra data (diff)
downloadfrr-8c70a46b650d59b2bce8190dead40aa92a6e1ef6.tar.xz
frr-8c70a46b650d59b2bce8190dead40aa92a6e1ef6.zip
pimd: Fix rare crash situation
When running pim on an interface and that interface has state and we move that interface into a different vrf there exists a call path where we have not created the pimreg device yet. Prevent a crash in this rare situation. Ticket: #2552763 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_oil.c')
-rw-r--r--pimd/pim_oil.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c
index 0a4e3e1a6..a3ca44bb5 100644
--- a/pimd/pim_oil.c
+++ b/pimd/pim_oil.c
@@ -426,9 +426,11 @@ static void pim_channel_update_mute(struct channel_oil *c_oil)
struct pim_interface *pim_reg_ifp;
struct pim_interface *vxlan_ifp;
- pim_reg_ifp = c_oil->pim->regiface->info;
- if (pim_reg_ifp)
- pim_channel_update_oif_mute(c_oil, pim_reg_ifp);
+ if (c_oil->pim->regiface) {
+ pim_reg_ifp = c_oil->pim->regiface->info;
+ if (pim_reg_ifp)
+ pim_channel_update_oif_mute(c_oil, pim_reg_ifp);
+ }
vxlan_ifp = pim_vxlan_get_term_ifp(c_oil->pim);
if (vxlan_ifp)
pim_channel_update_oif_mute(c_oil, vxlan_ifp);