summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index 943436f356..2bf0c6e6b5 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -472,6 +472,14 @@ int if_is_vrf(struct interface *ifp)
return CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);
}
+bool if_is_loopback_or_vrf(struct interface *ifp)
+{
+ if (if_is_loopback(ifp) || if_is_vrf(ifp))
+ return true;
+
+ return false;
+}
+
/* Does this interface support broadcast ? */
int if_is_broadcast(struct interface *ifp)
{