2005-11-20 Paul Jakma <paul.jakma@sun.com>

        * ospfd.h: remove the OSPF_ROUTER_ID_UPDATE_DELAY define
          (struct ospf) remove the router_id timer thread.
          remove export of ospf_router_id_update_timer.
        * ospfd.c: (ospf_router_id_update) call ospf_if_update to
          poke interfaces into action after ID has been configured.
          (ospf_router_id_update_timer) removed.
          (ospf_finish_final) t_router_id_update timer is gone.
          (ospf_network_run) router-id update timer gone.
          call ospf_router_id_update directly if ID not configured.
          In the per-iface loop, don't ospf_if_up interfaces if
          ID is still not configured. The update function will call
          ospf_if_update anyway.
          (ospf_if_update) ID update timer is gone. Just return if no
          ID is set.
        * ospf_vty.c: (ospf_router_id) call ospf_router_id_update, no
          timer needed.
        * ospf_zebra.c: (ospf_router_id_update_zebra) call
          ospf_router_id_update directly, not via timer.
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 3cc0202..7c9fb8f 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -119,22 +119,11 @@
 
       OSPF_TIMER_ON (ospf->t_router_lsa_update,
 		     ospf_router_lsa_update_timer, OSPF_LSA_UPDATE_DELAY);
+      
+      /* update ospf_interface's */
+      ospf_if_update (ospf);
     }
 }
-
-int
-ospf_router_id_update_timer (struct thread *thread)
-{
-  struct ospf *ospf = THREAD_ARG (thread);
-
-  if (IS_DEBUG_OSPF_EVENT)
-    zlog_debug ("Router-ID: Update timer fired!");
-
-  ospf->t_router_id_update = NULL;
-  ospf_router_id_update (ospf);
-
-  return 0;
-}
 
 /* For OSPF area sort by area id. */
 static int
@@ -454,7 +443,6 @@
 
   /* Cancel all timers. */
   OSPF_TIMER_OFF (ospf->t_external_lsa);
-  OSPF_TIMER_OFF (ospf->t_router_id_update);
   OSPF_TIMER_OFF (ospf->t_router_lsa_update);
   OSPF_TIMER_OFF (ospf->t_spf_calc);
   OSPF_TIMER_OFF (ospf->t_ase_calc);
@@ -834,12 +822,8 @@
 
   /* Schedule Router ID Update. */
   if (ospf->router_id_static.s_addr == 0)
-    if (ospf->t_router_id_update == NULL)
-      {
-	OSPF_TIMER_ON (ospf->t_router_id_update, ospf_router_id_update_timer,
-		       OSPF_ROUTER_ID_UPDATE_DELAY);
-      }
-
+    ospf_router_id_update (ospf);
+  
   /* Get target interface. */
   for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
     {
@@ -913,8 +897,14 @@
 		  }
 
 		ospf_area_add_if (oi->area, oi);
-
-		if (if_is_operative (ifp)) 
+		
+		/* if router_id is not configured, dont bring up
+		 * interfaces.
+                 * ospf_router_id_update() will call ospf_if_update
+                 * whenever r-id is configured instead.
+                 */
+		if ((ospf->router_id_static.s_addr != 0)
+		    && if_is_operative (ifp)) 
 		  ospf_if_up (oi);
 
 		break;
@@ -961,15 +951,10 @@
 
   if (ospf != NULL)
     {
-      /* Update Router ID scheduled. */
+      /* Router-ID must be configured. */
       if (ospf->router_id_static.s_addr == 0)
-        if (ospf->t_router_id_update == NULL)
-          {
-	    OSPF_TIMER_ON (ospf->t_router_id_update,
-			   ospf_router_id_update_timer,
-			   OSPF_ROUTER_ID_UPDATE_DELAY);
-          }
-
+        return;
+      
       /* Find interfaces that not configured already.  */
       for (ALL_LIST_ELEMENTS (ospf->oiflist, node, nnode, oi))
 	{