From 05cf46badbad99b76c4e974c7306c14494d1000e Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Mon, 27 Jul 2009 12:42:30 +0200 Subject: 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() --- ospfd/ospf_interface.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_interface.h') diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 0fc4ccba..ab0b7580 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -252,7 +252,8 @@ extern struct ospf_interface *ospf_if_table_lookup (struct interface *, struct prefix *); extern struct ospf_interface *ospf_if_addr_local (struct in_addr); extern struct ospf_interface *ospf_if_lookup_recv_if (struct ospf *, - struct in_addr); + struct in_addr, + struct interface *); extern struct ospf_interface *ospf_if_is_configured (struct ospf *, struct in_addr *); -- cgit v1.2.1