summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c6
1 files changed, 5 insertions, 1 deletions
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;
+ }
}
}