diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2018-05-03 09:39:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-03 09:39:55 -0500 |
| commit | 6d8fa7643d5baf3b04cbe38501c05aad65657fe1 (patch) | |
| tree | abcfc2bf17f492ff3de98a7fc29accd92051ad52 /pimd/pim_iface.c | |
| parent | a2892c914b7cab86ab06ec69028b46705cf5c4b5 (diff) | |
| parent | e55a43d491c8423feceb6c37b8d42d8b1637a0e5 (diff) | |
Merge pull request #2143 from donaldsharp/pimaroni
Pimaroni
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index ff7238ae97..5996a3ac96 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1547,27 +1547,20 @@ 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) +bool pim_if_is_vrf_device(struct interface *ifp) { - struct vrf *vrf; + if (if_is_vrf(ifp)) + return true; - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { - if (strncmp(ifp->name, vrf->name, strlen(ifp->name)) == 0) - return 1; - } - - return 0; + return false; } int pim_if_ifchannel_count(struct pim_interface *pim_ifp) |
