diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-05-14 09:46:36 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-05-19 14:48:11 -0400 |
| commit | 8c70a46b650d59b2bce8190dead40aa92a6e1ef6 (patch) | |
| tree | 5c852a6c2fa2393fb204175951f59fc69c254307 /pimd/pim_oil.c | |
| parent | 262649bd05e0bbc36dce45cc2fd7e19d6955f3c9 (diff) | |
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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pimd/pim_oil.c b/pimd/pim_oil.c index 0a4e3e1a6f..a3ca44bb50 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); |
