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>
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);