summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2009-07-27 12:42:30 +0200
committerPaul Jakma <paul@quagga.net>2009-07-28 18:47:43 +0100
commit05cf46badbad99b76c4e974c7306c14494d1000e (patch)
treedd1fd18afc3d7ef6f92281c1c6fb0bc8ebd6a58b /ospfd/ospf_packet.c
parentf0f63841582ed97362619a53fb711747f09d961b (diff)
downloadquagga-05cf46badbad99b76c4e974c7306c14494d1000e.tar.bz2
quagga-05cf46badbad99b76c4e974c7306c14494d1000e.tar.xz
ospfd: Make ospf_if_lookup_recv_if() find the right unnumbered i/f
This function will return the interface for the first matching remote address for PtP i/f's. That won't work for multiple unnumbered i/f's as these may all have the same address. Pass in the struct interface pointer, ifp, to find the correct set of oi's to search in. This also reduces the size of the search list, making it faster. * ospfd/ospf_interface.c: Add struct interface * param to ospf_if_lookup_recv_if() to select the right list to search in. * ospfd/ospf_interface.h: ditto. * ospfd/ospf_packet.c: Pass new ifp argument to ospf_if_lookup_recv_if()
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 7ebf114e..effef390 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2373,7 +2373,7 @@ ospf_read (struct thread *thread)
ospfh = (struct ospf_header *) STREAM_PNT (ibuf);
/* associate packet with ospf interface */
- oi = ospf_if_lookup_recv_if (ospf, iph->ip_src);
+ oi = ospf_if_lookup_recv_if (ospf, iph->ip_src, ifp);
/* If incoming interface is passive one, ignore it. */
if (oi && OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_PASSIVE)
@@ -2419,7 +2419,7 @@ ospf_read (struct thread *thread)
return 0;
}
}
-
+
/* else it must be a local ospf interface, check it was received on
* correct link
*/