summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2003-05-24 13:48:16 +0000
committerpaul <paul>2003-05-24 13:48:16 +0000
commit0a825c79339870bd9d815172a29ae9567b61c4e6 (patch)
tree12e6c9948fc6229fa61bbfce191a6b48909426f9
parente9af5c78a0110bd0066d54e3ece50ffa875cafc8 (diff)
2003-05-24 Kenji Yabuuchi
* ospf_interface.c(ospf_if_lookup_recv_if): Use the most specific match for interface lookup.
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_interface.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 1109eb0a..7720adcc 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-24 Kenji Yabuuchi
+
+ * ospf_interface.c(ospf_if_lookup_recv_if): Use the most specific
+ match for interface lookup.
+
2003-05-18 Hasso Tepper <hasso@estpak.ee>
* ospf_vty.c: Show NSSA LSA route info in "show ip ospf database"
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;
+ }
}
}