diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index dfcbe89..094742f 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-04 Paul Jakma <paul.jakma@sun.com>
+
+	* ospf_lsdb.c: (ospf_lsdb_delete_entry) new function, consolidate
+	  exact same functionality replicated in other functions.
+	  (ospf_lsdb_add) Strip out code by using ospf_lsdb_delete_entry.
+	  (ospf_lsdb_delete) ditto.
+	  (ospf_lsdb_delete_all) ditto.
+
 2006-07-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
 	* ospfd.c: (ospf_router_id_update) Fix and document the algorithm for
diff --git a/ospfd/ospf_lsdb.c b/ospfd/ospf_lsdb.c
index 28d92bd..a992cf4 100644
--- a/ospfd/ospf_lsdb.c
+++ b/ospfd/ospf_lsdb.c
@@ -81,6 +81,31 @@
   lp->adv_router = lsa->data->adv_router;
 }
 
+static void
+ospf_lsdb_delete_entry (struct ospf_lsdb *lsdb, struct route_node *rn)
+{
+  struct ospf_lsa *lsa = rn->info;
+  
+  if (!lsa)
+    return;
+  
+  assert (rn->table == lsdb->type[lsa->data->type].db);
+  
+  if (IS_LSA_SELF (lsa))
+    lsdb->type[lsa->data->type].count_self--;
+  lsdb->type[lsa->data->type].count--;
+  lsdb->type[lsa->data->type].checksum -= ntohs(lsa->data->checksum);
+  lsdb->total--;
+  rn->info = NULL;
+  route_unlock_node (rn);
+#ifdef MONITOR_LSDB_CHANGE
+  if (lsdb->del_lsa_hook != NULL)
+    (* lsdb->del_lsa_hook)(lsa);
+#endif /* MONITOR_LSDB_CHANGE */
+  ospf_lsa_unlock (&lsa); /* lsdb */
+  return;
+}
+
 /* Add new LSA to lsdb. */
 void
 ospf_lsdb_add (struct ospf_lsdb *lsdb, struct ospf_lsa *lsa)
@@ -88,36 +113,30 @@
   struct route_table *table;
   struct prefix_ls lp;
   struct route_node *rn;
-  struct ospf_lsa *old;
 
   table = lsdb->type[lsa->data->type].db;
   lsdb_prefix_set (&lp, lsa);
   rn = route_node_get (table, (struct prefix *)&lp);
-  if (!rn->info)
-    {
-      if (IS_LSA_SELF (lsa))
-	lsdb->type[lsa->data->type].count_self++;
-      lsdb->type[lsa->data->type].count++;
-      lsdb->total++;
-    }
-  else
-    {
-      if (rn->info == lsa)
-	return;
-      
-      old = rn->info;
-      lsdb->type[old->data->type].checksum -= ntohs(old->data->checksum);
+  
+  /* nothing to do? */
+  if (rn->info && rn->info == lsa)
+    return;
+  
+  /* purge old entry? */
+  if (rn->info)
+    ospf_lsdb_delete_entry (lsdb, rn);
 
-      ospf_lsa_unlock (&rn->info);
-      route_unlock_node (rn);
-    }
+  if (IS_LSA_SELF (lsa))
+    lsdb->type[lsa->data->type].count_self++;
+  lsdb->type[lsa->data->type].count++;
+  lsdb->total++;
 
 #ifdef MONITOR_LSDB_CHANGE
   if (lsdb->new_lsa_hook != NULL)
     (* lsdb->new_lsa_hook)(lsa);
 #endif /* MONITOR_LSDB_CHANGE */
   lsdb->type[lsa->data->type].checksum += ntohs(lsa->data->checksum);
-  rn->info = ospf_lsa_lock (lsa);
+  rn->info = ospf_lsa_lock (lsa); /* lsdb */
 }
 
 void
@@ -146,24 +165,11 @@
   table = lsdb->type[lsa->data->type].db;
   lsdb_prefix_set (&lp, lsa);
   rn = route_node_lookup (table, (struct prefix *) &lp);
-  if (rn)
-    if (rn->info == lsa)
-      {
-	if (IS_LSA_SELF (lsa))
-	  lsdb->type[lsa->data->type].count_self--;
-	lsdb->type[lsa->data->type].count--;
-	lsdb->type[lsa->data->type].checksum -= ntohs(lsa->data->checksum);
-	lsdb->total--;
-	rn->info = NULL;
-	route_unlock_node (rn);
-	route_unlock_node (rn);
-#ifdef MONITOR_LSDB_CHANGE
-        if (lsdb->del_lsa_hook != NULL)
-          (* lsdb->del_lsa_hook)(lsa);
-#endif /* MONITOR_LSDB_CHANGE */
-	ospf_lsa_unlock (&lsa);
-	return;
-      }
+  if (rn && (rn->info == lsa))
+    {
+      ospf_lsdb_delete_entry (lsdb, rn);
+      route_unlock_node (rn); /* route_node_lookup */
+    }
 }
 
 void
@@ -171,28 +177,14 @@
 {
   struct route_table *table;
   struct route_node *rn;
-  struct ospf_lsa *lsa;
   int i;
 
   for (i = OSPF_MIN_LSA; i < OSPF_MAX_LSA; i++)
     {
       table = lsdb->type[i].db;
       for (rn = route_top (table); rn; rn = route_next (rn))
-	if ((lsa = (rn->info)) != NULL)
-	  {
-	    if (IS_LSA_SELF (lsa))
-	      lsdb->type[i].count_self--;
-	    lsdb->type[i].count--;
-	    lsdb->type[i].checksum -= ntohs(lsa->data->checksum);
-	    lsdb->total--;
-	    rn->info = NULL;
-	    route_unlock_node (rn);
-#ifdef MONITOR_LSDB_CHANGE
-            if (lsdb->del_lsa_hook != NULL)
-              (* lsdb->del_lsa_hook)(lsa);
-#endif /* MONITOR_LSDB_CHANGE */
-	    ospf_lsa_unlock (&lsa);
-	  }
+	if (rn->info != NULL)
+	  ospf_lsdb_delete_entry (lsdb, rn);
     }
 }
 
