diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index b7cc20d..ef1048b 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -88,23 +88,18 @@
 }
 
 static void
-ospf_area_range_delete (struct ospf_area *area, struct ospf_area_range *range)
+ospf_area_range_delete (struct ospf_area *area, struct route_node *rn)
 {
-  struct route_node *rn;
-  struct prefix_ipv4 p;
+  struct ospf_area_range *range = rn->info;
 
-  p.family = AF_INET;
-  p.prefixlen = range->masklen;
-  p.prefix = range->addr;
+  if (range->specifics != 0)
+    ospf_delete_discard_route (area->ospf->new_table,
+			       (struct prefix_ipv4 *) &rn->p);
 
-  rn = route_node_lookup (area->ranges, (struct prefix *)&p);
-  if (rn)
-    {
-      ospf_area_range_free (rn->info);
-      rn->info = NULL;
-      route_unlock_node (rn);
-      route_unlock_node (rn);
-    }
+  ospf_area_range_free (range);
+  rn->info = NULL;
+  route_unlock_node (rn);
+  route_unlock_node (rn);
 }
 
 struct ospf_area_range *
@@ -263,20 +258,20 @@
 		       struct prefix_ipv4 *p)
 {
   struct ospf_area *area;
-  struct ospf_area_range *range;
+  struct route_node *rn;
 
   area = ospf_area_lookup_by_area_id (ospf, area_id);
   if (area == NULL)
     return 0;
 
-  range = ospf_area_range_lookup (area, p);
-  if (range == NULL)
+  rn = route_node_lookup (area->ranges, (struct prefix*)p);
+  if (rn == NULL)
     return 0;
 
-  if (ospf_area_range_active (range))
+  if (ospf_area_range_active (rn->info))
     ospf_schedule_abr_task (ospf);
 
-  ospf_area_range_delete (area, range);
+  ospf_area_range_delete (area, rn);
 
   return 1;
 }
@@ -1695,7 +1690,8 @@
 	      ospf_add_discard_route (ospf->new_table, area,
 				      (struct prefix_ipv4 *) &rn->p);
 	    else
-	      ospf_delete_discard_route ((struct prefix_ipv4 *) &rn->p);
+	      ospf_delete_discard_route (ospf->new_table,
+					 (struct prefix_ipv4 *) &rn->p);
 	  }
 }
 
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index a5d6d18..c3acba3 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -954,6 +954,10 @@
       ospf_route_free (rn->info);
   }
 
+  if (IS_DEBUG_OSPF_EVENT)
+    zlog_debug ("ospf_add_discard_route(): "
+		"adding %s/%d", inet_ntoa (p->prefix), p->prefixlen);
+
   new_or = ospf_route_new ();
   new_or->type = OSPF_DESTINATION_DISCARD;
   new_or->id.s_addr = 0;
@@ -969,8 +973,52 @@
 }
 
 void
-ospf_delete_discard_route (struct prefix_ipv4 *p)
+ospf_delete_discard_route (struct route_table *rt, struct prefix_ipv4 *p)
 {
+  struct route_node *rn;
+  struct ospf_route *or;
+
+  if (IS_DEBUG_OSPF_EVENT)
+    zlog_debug ("ospf_delete_discard_route(): "
+		"deleting %s/%d", inet_ntoa (p->prefix), p->prefixlen);
+
+  rn = route_node_lookup (rt, (struct prefix*)p);
+
+  if (rn == NULL)
+    {
+      if (IS_DEBUG_OSPF_EVENT)
+	zlog_debug("ospf_delete_discard_route(): no route found");
+      return;
+    }
+
+  or = rn->info;
+
+  if (or->path_type == OSPF_PATH_INTRA_AREA)
+    {
+      if (IS_DEBUG_OSPF_EVENT)
+	zlog_debug ("ospf_delete_discard_route(): "
+		    "an intra-area route exists");
+      return;
+    }
+
+  if (or->type != OSPF_DESTINATION_DISCARD)
+    {
+      if (IS_DEBUG_OSPF_EVENT)
+	zlog_debug ("ospf_delete_discard_route(): "
+		    "not a discard entry");
+      return;
+    }
+
+  /* free the route entry and the route node */
+  ospf_route_free (rn->info);
+
+  rn->info = NULL;
+  route_unlock_node (rn);
+  route_unlock_node (rn);
+
+  /* remove the discard entry from the rib */
   ospf_zebra_delete_discard(p);
+
+  return;
 }
 
diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h
index 5742b46..6c202b0 100644
--- a/ospfd/ospf_route.h
+++ b/ospfd/ospf_route.h
@@ -159,7 +159,7 @@
 extern void ospf_prune_unreachable_routers (struct route_table *);
 extern int ospf_add_discard_route (struct route_table *, struct ospf_area *,
 				   struct prefix_ipv4 *);
-extern void ospf_delete_discard_route (struct prefix_ipv4 *);
+extern void ospf_delete_discard_route (struct route_table *, struct prefix_ipv4 *);
 extern int ospf_route_match_same (struct route_table *, struct prefix_ipv4 *,
 				  struct ospf_route *);
 
