]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Prevent crash with igmp only config
authorDonald Sharp <sharpd@nvidia.com>
Thu, 21 Jan 2021 12:28:19 +0000 (07:28 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 21 Jan 2021 15:37:50 +0000 (10:37 -0500)
Issue: #7892 has a startup config where only igmp
interfaces are created and a igmp report comes in.

Effectively we are not creating the regiface device unless
we do a `ip pim`.  This is incorrect we should always create
the regiface.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd/pim_nb_config.c

index ba044de2f847e9ac22092c849b59bf415ffd08b3..4bc78529a83a9b9c53dcc1fdfcc77f29c2a72043 100644 (file)
@@ -545,7 +545,7 @@ static int pim_cmd_igmp_start(struct interface *ifp)
        pim_ifp = ifp->info;
 
        if (!pim_ifp) {
-               (void)pim_if_new(ifp, true, false, false, false);
+               pim_ifp = pim_if_new(ifp, true, false, false, false);
                need_startup = 1;
        } else {
                if (!PIM_IF_TEST_IGMP(pim_ifp->options)) {
@@ -553,6 +553,7 @@ static int pim_cmd_igmp_start(struct interface *ifp)
                        need_startup = 1;
                }
        }
+       pim_if_create_pimreg(pim_ifp->pim);
 
        /* 'ip igmp' executed multiple times, with need_startup
         * avoid multiple if add all and membership refresh