[quagga-dev 7847] [PATCH 4/8] ospfd: Use route_node_lookup() instaed of route_node_get()

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Mon Mar 8 12:58:11 GMT 2010


Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
---
 ospfd/ospf_abr.c  |    4 +++-
 ospfd/ospf_snmp.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 7e32195..2c0a7bc 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -138,7 +138,9 @@ ospf_area_range_lookup_next (struct ospf_area *area,
     rn = route_top (area->ranges);
   else
     {
-      rn = route_node_get (area->ranges, (struct prefix *) &p);
+      rn = route_node_lookup (area->ranges, (struct prefix *) &p);
+      if (!rn)
+	return NULL;
       rn = route_next (rn);
     }
 
diff --git a/ospfd/ospf_snmp.c b/ospfd/ospf_snmp.c
index cc4974c..e842229 100644
--- a/ospfd/ospf_snmp.c
+++ b/ospfd/ospf_snmp.c
@@ -1968,7 +1968,9 @@ ospf_snmp_vl_lookup_next (struct in_addr *area_id, struct in_addr *neighbor,
     rn = route_top (ospf_snmp_vl_table);
   else
     {
-      rn = route_node_get (ospf_snmp_vl_table, (struct prefix *) &lp);
+      rn = route_node_lookup (ospf_snmp_vl_table, (struct prefix *) &lp);
+      if (!rn)
+	return NULL;
       rn = route_next (rn);
     }
 
-- 
1.6.4.4




More information about the Quagga-dev mailing list