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.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 35351b57..45fa0238 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -150,14 +150,18 @@ ospf_if_table_lookup (struct interface *ifp, struct prefix *prefix)
{
struct prefix p;
struct route_node *rn;
- struct ospf_interface *rninfo;
+ struct ospf_interface *rninfo = NULL;
p = *prefix;
-
- rn = route_node_get (IF_OIFS (ifp), &p);
+ p.prefixlen = IPV4_MAX_PREFIXLEN;
+
/* route_node_get implicitely locks */
- rninfo = (struct ospf_interface *) rn->info;
- route_unlock_node (rn);
+ if (rn = route_node_lookup (IF_OIFS (ifp), &p))
+ {
+ rninfo = (struct ospf_interface *) rn->info;
+ route_unlock_node (rn);
+ }
+
return rninfo;
}