summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_iface.c12
-rw-r--r--pimd/pim_iface.h2
2 files changed, 5 insertions, 9 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index e58d81591d..5996a3ac96 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -1555,16 +1555,12 @@ bool pim_if_is_loopback(struct interface *ifp)
return false;
}
-int pim_if_is_vrf_device(struct interface *ifp)
+bool pim_if_is_vrf_device(struct interface *ifp)
{
- struct vrf *vrf;
-
- RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
- if (strncmp(ifp->name, vrf->name, strlen(ifp->name)) == 0)
- return 1;
- }
+ if (if_is_vrf(ifp))
+ return true;
- return 0;
+ return false;
}
int pim_if_ifchannel_count(struct pim_interface *pim_ifp)
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index 12098fde29..cf025cbd4a 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -209,7 +209,7 @@ int pim_update_source_set(struct interface *ifp, struct in_addr source);
bool pim_if_is_loopback(struct interface *ifp);
-int pim_if_is_vrf_device(struct interface *ifp);
+bool pim_if_is_vrf_device(struct interface *ifp);
int pim_if_ifchannel_count(struct pim_interface *pim_ifp);
#endif /* PIM_IFACE_H */