ospf6d: Fixing a couple of issues with ospf6_route_remove () routine.

When a route_node has multiple ospf6_routes under it (common subnet case),
then the current implementation has an issue in adjusting the route_node->info
on a ospf6_route_remove() call.

The main reason is that it ends up using exact match to determine if the next
ospf6_route belongs to the same route_node or not. Fixing that part to use
rnode (the existing back-pointer to the route_node) from the ospf6_route to
determine that.

Also fixing some of the walks to turn them safe so that the route deletion is
fine.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 870ab18..617f8d6 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -240,7 +240,7 @@
 {
   struct ospf6_as_external_lsa *external;
   struct prefix prefix;
-  struct ospf6_route *route;
+  struct ospf6_route *route, *nroute;
   char buf[64];
 
   external = (struct ospf6_as_external_lsa *)
@@ -274,8 +274,9 @@
 
   for (ospf6_route_lock (route);
        route && ospf6_route_is_prefix (&prefix, route);
-       route = ospf6_route_next (route))
+       route = nroute)
     {
+      nroute = ospf6_route_next (route);
       if (route->type != OSPF6_DEST_TYPE_NETWORK)
         continue;
       if (route->path.origin.type != lsa->header->type)