]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix rare crash situation 8671/head
authorDonald Sharp <sharpd@nvidia.com>
Fri, 14 May 2021 13:46:36 +0000 (09:46 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 19 May 2021 18:48:11 +0000 (14:48 -0400)
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>
pimd/pim_oil.c

index 0a4e3e1a6f6ab0ee14f742da08fbe0002cdbaa4e..a3ca44bb501a975c7d5618d9ab038793f6ec261b 100644 (file)
@@ -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);