]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: create pimreg implicity if ipmr-lo is the first pim device
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Sat, 6 Apr 2019 14:52:11 +0000 (07:52 -0700)
committerAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Sat, 20 Apr 2019 15:33:23 +0000 (08:33 -0700)
On the first pim interface creation pimreg needs to be implicitly
created.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
pimd/pim_vxlan.c

index fbc9adaf27b411149559cf6dfebdc7f50135959c..a4a6ce6922006f138d05cdbb80b20ff08f03bdf5 100644 (file)
@@ -960,11 +960,16 @@ void pim_vxlan_add_term_dev(struct pim_instance *pim,
 
        /* enable pim on the term ifp */
        pim_ifp = (struct pim_interface *)ifp->info;
-       if (pim_ifp)
+       if (pim_ifp) {
                PIM_IF_DO_PIM(pim_ifp->options);
-       else
+       } else {
                pim_ifp = pim_if_new(ifp, false /*igmp*/, true /*pim*/,
                                false /*pimreg*/, true /*vxlan_term*/);
+               /* ensure that pimreg existss before using the newly created
+                * vxlan termination device
+                */
+               pim_if_create_pimreg(pim);
+       }
 
        pim->vxlan.term_if = ifp;
        hash_iterate(pim_ifp->pim->vxlan.sg_hash,