diff options
-rw-r--r-- | pimd/pim_iface.c | 11 | ||||
-rw-r--r-- | pimd/pim_iface.h | 2 | ||||
-rw-r--r-- | pimd/pim_pim.c | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index ff7238ae9..e58d81591 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1547,15 +1547,12 @@ 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) +bool pim_if_is_loopback(struct interface *ifp) { - if (if_is_loopback(ifp)) - return 1; - - if (strcmp(ifp->name, pim->vrf->name) == 0) - return 1; + if (if_is_loopback(ifp) || if_is_vrf(ifp)) + return true; - return 0; + return false; } int pim_if_is_vrf_device(struct interface *ifp) diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h index 5ecd07d22..12098fde2 100644 --- a/pimd/pim_iface.h +++ b/pimd/pim_iface.h @@ -207,7 +207,7 @@ 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); +bool pim_if_is_loopback(struct interface *ifp); int pim_if_is_vrf_device(struct interface *ifp); diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index ffe5d52a1..de09b070f 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -653,7 +653,7 @@ static int pim_hello_send(struct interface *ifp, uint16_t holdtime) { struct pim_interface *pim_ifp = ifp->info; - if (pim_if_is_loopback(pim_ifp->pim, ifp)) + if (pim_if_is_loopback(ifp)) return 0; if (hello_send(ifp, holdtime)) { @@ -755,7 +755,7 @@ void pim_hello_restart_triggered(struct interface *ifp) /* * No need to ever start loopback or vrf device hello's */ - if (pim_if_is_loopback(pim_ifp->pim, ifp)) + if (pim_if_is_loopback(ifp)) return; /* |