From 0a825c79339870bd9d815172a29ae9567b61c4e6 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 24 May 2003 13:48:16 +0000 Subject: 2003-05-24 Kenji Yabuuchi * ospf_interface.c(ospf_if_lookup_recv_if): Use the most specific match for interface lookup. --- ospfd/ospf_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ospfd/ospf_interface.c') diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index c37e1948..569e4781 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -425,7 +425,11 @@ ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src) else { if (prefix_match (oi->address, (struct prefix *) &addr)) - match = oi; + { + if (match == NULL || + (match->address->prefixlen < oi->address->prefixlen) + match = oi; + } } } -- cgit v1.2.1