summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2009-08-13 15:39:42 +0000
committerDavid Lamparter <equinox@diac24.net>2010-02-04 02:03:42 +0100
commit98dda61bc222aeccb754915954175d3ac8f8768d (patch)
tree8bc69242a15465ebff6dc27f22db63c943148148 /ospfd/ospf_interface.c
parent2f9994561e1a6547f9e55d41da85f755c97553f4 (diff)
downloadquagga-98dda61bc222aeccb754915954175d3ac8f8768d.tar.bz2
quagga-98dda61bc222aeccb754915954175d3ac8f8768d.tar.xz
ospfd: Update SPF calculation for unnumbered links
Add support for real unnumbered PtP interfaces in ospf_nexthop_calculation(). Add ospf_if_lookup_by_ifindex() to support Unnumbered PtP links. This version does not support: - Multiple numbered PtP interfaces with the same IP address between the same two routers. - Unnumbered PtP on just one end of the link. * ospfd/ospf_interface.c: Add ospf_if_lookup_by_ifindex(). * ospfd/ospf_interface.h: ditto. * ospfd/ospf_spf.c: ospf_nexthop_calculation (), call ospf_if_lookup_by_ifindex() for Unnumbered PtP links.
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)