summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 2afe19ec..2f94b43f 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -371,6 +371,23 @@ ospf_if_is_up (struct ospf_interface *oi)
}
struct ospf_interface *
+ospf_if_exists (struct ospf_interface *oic)
+{
+ listnode node;
+ struct ospf *ospf;
+ struct ospf_interface *oi;
+
+ ospf = ospf_lookup ();
+
+ for (node = listhead (ospf->oiflist); node; nextnode (node))
+ {
+ if (((oi = getdata (node)) != NULL) && (oi == oic))
+ return oi;
+ }
+ return NULL;
+}
+
+struct ospf_interface *
ospf_if_lookup_by_local_addr (struct ospf *ospf,
struct interface *ifp, struct in_addr address)
{