diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 88636f1..7e32195 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -814,15 +814,12 @@
 {
   struct listnode *node, *nnode;
   struct ospf_path *path;
+  struct ospf_interface *oi;
 
-  for (ALL_LIST_ELEMENTS (or->paths, node, nnode, path))
-    {
-      struct ospf_interface *oi = path->oi;
-
-      if (oi != NULL)
-        if (oi->area == area)
-          return 1;
-    }
+  for (ALL_LIST_ELEMENTS_RO (or->paths, node, path))
+    for (ALL_LIST_ELEMENTS_RO (area->oiflist, nnode, oi))
+      if (oi->ifp && oi->ifp->ifindex == path->ifindex)
+	return 1;
 
   return 0;
 }
diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c
index 044f97c..7bddf3f 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -135,6 +135,7 @@
 {
   struct listnode *node;
   struct ospf_path *op;
+  struct interface *ifp;
 
   for (ALL_LIST_ELEMENTS_RO (ro->paths, node, op))
     if (op->nexthop.s_addr == 0)
@@ -593,7 +594,7 @@
        
        if (! IPV4_ADDR_SAME (&op->nexthop, &newop->nexthop))
 	 return 0;
-       if (op->oi->ifp->ifindex != newop->oi->ifp->ifindex)
+       if (op->ifindex != newop->ifindex)
 	 return 0;
      }
    return 1;
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index 0829e8e..267237b 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -165,7 +165,7 @@
 
 	       if (! IPV4_ADDR_SAME (&op->nexthop, &newop->nexthop))
 		 return 0;
-	       if (op->oi->ifp->ifindex != newop->oi->ifp->ifindex)
+	       if (op->ifindex != newop->ifindex)
 		 return 0;
 	     }
 	   return 1;
@@ -640,7 +640,7 @@
 
 	  path = ospf_path_new ();
 	  path->nexthop.s_addr = 0;
-	  path->oi = oi;
+	  path->ifindex = oi->ifp->ifindex;
 	  listnode_add (or->paths, path);
 	}
       else
@@ -788,7 +788,8 @@
   struct ospf_path *path;
 
   for (ALL_LIST_ELEMENTS (plist, node, nnode, path))
-    if (IPV4_ADDR_SAME (&path->nexthop, &nexthop) && path->oi == oi)
+    if (IPV4_ADDR_SAME (&path->nexthop, &nexthop) &&
+	path->ifindex == oi->ifp->ifindex)
       return 1;
 
   return 0;
@@ -815,7 +816,7 @@
 	    {
 	      path = ospf_path_new ();
 	      path->nexthop = nexthop->router;
-	      path->oi = nexthop->oi;
+	      path->ifindex = nexthop->oi->ifp->ifindex;
 	      listnode_add (to->paths, path);
 	    }
 	}
@@ -834,7 +835,7 @@
       continue;
     if (!IPV4_ADDR_SAME (&op->adv_router, &path->adv_router))
       continue;
-    if (op->oi->ifp->ifindex != path->oi->ifp->ifindex)
+    if (op->ifindex != path->ifindex)
       continue;
     return op;
   }
diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h
index 0d37436..17ab68e 100644
--- a/ospfd/ospf_route.h
+++ b/ospfd/ospf_route.h
@@ -39,7 +39,7 @@
 {
   struct in_addr nexthop;
   struct in_addr adv_router;
-  struct ospf_interface *oi;
+  unsigned int ifindex;
 };
 
 /* Below is the structure linked to every
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 12afe5d..9566843 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1077,13 +1077,14 @@
                 {
                   if (IS_DEBUG_OSPF_EVENT)
                     zlog_debug ("   directly attached to %s\r\n",
-                               IF_NAME (path->oi));
+				ifindex2ifname (path->ifindex));
                 }
               else
                 {
                   if (IS_DEBUG_OSPF_EVENT)
                     zlog_debug ("   via %s, %s\r\n",
-                               inet_ntoa (path->nexthop), IF_NAME (path->oi));
+				inet_ntoa (path->nexthop),
+				ifindex2ifname (path->ifindex));
                 }
             }
         }
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 2e4b607..7c3dec8 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -7138,15 +7138,15 @@
         if (or->type == OSPF_DESTINATION_NETWORK)
           for (ALL_LIST_ELEMENTS (or->paths, pnode, pnnode, path))
             {
-              if (path->oi != NULL && ospf_if_exists(path->oi))
+              if (if_lookup_by_index(path->ifindex))
                 {
                   if (path->nexthop.s_addr == 0)
                     vty_out (vty, "%24s   directly attached to %s%s",
-                             "", path->oi->ifp->name, VTY_NEWLINE);
+                             "", ifindex2ifname (path->ifindex), VTY_NEWLINE);
                   else
                     vty_out (vty, "%24s   via %s, %s%s", "",
-                             inet_ntoa (path->nexthop), path->oi->ifp->name,
-                             VTY_NEWLINE);
+                             inet_ntoa (path->nexthop),
+			     ifindex2ifname (path->ifindex), VTY_NEWLINE);
                 }
             }
       }
@@ -7188,15 +7188,17 @@
                   
                   for (ALL_LIST_ELEMENTS_RO (or->paths, pnode, path))
                     {
-		      if (path->oi != NULL && ospf_if_exists(path->oi))
+		      if (if_lookup_by_index(path->ifindex))
 			{
 			  if (path->nexthop.s_addr == 0)
 			    vty_out (vty, "%24s   directly attached to %s%s",
-				     "", path->oi->ifp->name, VTY_NEWLINE);
+				     "", ifindex2ifname (path->ifindex),
+				     VTY_NEWLINE);
 			  else
 			    vty_out (vty, "%24s   via %s, %s%s", "",
 				     inet_ntoa (path->nexthop),
-				     path->oi->ifp->name, VTY_NEWLINE);
+				     ifindex2ifname (path->ifindex),
+				     VTY_NEWLINE);
 			}
                     }
           }
@@ -7235,14 +7237,15 @@
 
         for (ALL_LIST_ELEMENTS (er->paths, pnode, pnnode, path))
           {
-            if (path->oi != NULL && ospf_if_exists(path->oi))
+            if (if_lookup_by_index(path->ifindex))
               {
                 if (path->nexthop.s_addr == 0)
                   vty_out (vty, "%24s   directly attached to %s%s",
-                           "", path->oi->ifp->name, VTY_NEWLINE);
+                           "", ifindex2ifname (path->ifindex), VTY_NEWLINE);
                 else
                   vty_out (vty, "%24s   via %s, %s%s", "",
-                           inet_ntoa (path->nexthop), path->oi->ifp->name,
+                           inet_ntoa (path->nexthop),
+			   ifindex2ifname (path->ifindex),
                            VTY_NEWLINE);
               }
            }
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 8f624a4..52b23fe 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -378,8 +378,8 @@
           else
             {
               stream_putc (s, ZEBRA_NEXTHOP_IFINDEX);
-              if (path->oi)
-                stream_putl (s, path->oi->ifp->ifindex);
+              if (path->ifindex)
+                stream_putl (s, path->ifindex);
               else
                 stream_putl (s, 0);
             }
@@ -439,11 +439,11 @@
               nexthop = &path->nexthop;
               api.nexthop = &nexthop;
             }
-          else if (ospf_if_exists(path->oi) && (path->oi->ifp))
+          else if (if_lookup_by_index(path->ifindex))
             {
               SET_FLAG (api.message, ZAPI_MESSAGE_NEXTHOP);
               api.ifindex_num = 1;
-              api.ifindex = &path->oi->ifp->ifindex;
+              api.ifindex = &path->ifindex;
             }
           else if ( IS_DEBUG_OSPF(zebra,ZEBRA_REDISTRIBUTE) )
             {
