]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Don't send hello's out vrf interface
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 2 Jun 2017 22:23:11 +0000 (18:23 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:38 +0000 (13:51 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_iface.c
pimd/pim_iface.h
pimd/pim_pim.c

index 2d8b2b7979d1c614b93a5be1e7c20442a05f134e..19747ebcb3969d05e1dfb0505b90b5d48c860749 100644 (file)
@@ -1582,3 +1582,14 @@ int pim_if_connected_to_source(struct interface *ifp, struct in_addr src)
 
        return 0;
 }
+
+int pim_if_is_loopback(struct pim_instance *pim, struct interface *ifp)
+{
+       if (if_is_loopback(ifp))
+               return 1;
+
+       if (strcmp(ifp->name, pim->vrf->name) == 0)
+               return 1;
+
+       return 0;
+}
index 703b83b05d1573101eb1f31d022d10f827950c0d..7eff2990235e3f07d2735d6e32cd7da56268d6f9 100644 (file)
@@ -205,4 +205,5 @@ void pim_if_create_pimreg(struct pim_instance *pim);
 int pim_if_connected_to_source(struct interface *ifp, struct in_addr src);
 int pim_update_source_set(struct interface *ifp, struct in_addr source);
 
+int pim_if_is_loopback(struct pim_instance *pim, struct interface *ifp);
 #endif /* PIM_IFACE_H */
index 8840abd888fd7c2371f50567ff37f0c7c4158619..be5bcee5db44c95788366128bfa4864c008df5e8 100644 (file)
@@ -667,13 +667,9 @@ static int hello_send(struct interface *ifp, uint16_t holdtime)
 
 static int pim_hello_send(struct interface *ifp, uint16_t holdtime)
 {
-       struct pim_interface *pim_ifp;
-
-       zassert(ifp);
-       pim_ifp = ifp->info;
-       zassert(pim_ifp);
+       struct pim_interface *pim_ifp = ifp->info;
 
-       if (if_is_loopback(ifp))
+       if (pim_if_is_loopback(pim_ifp->pim, ifp))
                return 0;
 
        if (hello_send(ifp, holdtime)) {