summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index afe3acf1..775b121f 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -479,6 +479,20 @@ ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src,
return match;
}
+
+struct ospf_interface *
+ospf_if_lookup_by_ifindex(struct ospf_area *area, unsigned int ifindex)
+{
+ struct listnode *node;
+ struct ospf_interface *oi;
+
+ for (ALL_LIST_ELEMENTS_RO (area->oiflist, node, oi))
+ {
+ if (oi->ifp->ifindex == ifindex)
+ return oi;
+ }
+ return NULL;
+}
void
ospf_if_stream_set (struct ospf_interface *oi)