diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 05f96ac..1d7a4a1 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,15 @@
+2006-08-25 Paul Jakma <paul.jakma@sun.com>
+
+	* (general) Bug #134. Be more robust to backward time changes,
+	  use the newly added libzebra time functions.
+	  In most cases: recent_time -> recent_relative_time()
+	  gettimeofday -> quagga_gettime (QUAGGA_CLK_MONOTONIC, ..)
+	  time -> quagga_time.
+	  (ospf_make_md5_digest) time() call deliberately not changed.
+	  (ospf_external_lsa_refresh) remove useless gettimeofday, LSA
+	  tv_orig time was already set in ospf_lsa_new, called via
+	  ospf_external_lsa_new.
+
 2006-08-04 Paul Jakma <paul.jakma@sun.com>
 
 	* ospf_lsdb.c: (ospf_lsdb_delete_entry) new function, consolidate
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c
index b8dc795..2fcbfe6 100644
--- a/ospfd/ospf_dump.c
+++ b/ospfd/ospf_dump.c
@@ -300,7 +300,7 @@
   if (!t)
     return "inactive";
   
-  result = tv_sub (t->u.sands, recent_time);
+  result = tv_sub (t->u.sands, recent_relative_time());
   return ospf_timeval_dump (&result, buf, size);
 }
 
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index 91cbbf3..0f485fe 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -268,7 +268,7 @@
 		       "while local one is initial instance.");
           ; /* Accept this LSA for quick LSDB resynchronization. */
         }
-      else if (tv_cmp (tv_sub (recent_time, current->tv_recv),
+      else if (tv_cmp (tv_sub (recent_relative_time (), current->tv_recv),
 	               int2tv (OSPF_MIN_LS_ARRIVAL)) < 0)
         {
           if (IS_DEBUG_OSPF_EVENT)
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index b99b931..05eed35 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -141,7 +141,7 @@
   struct timeval delta, now;
   int delay = 0;
 
-  gettimeofday (&now, NULL);
+  quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
   delta = tv_sub (now, lsa->tv_orig);
 
   if (tv_cmp (delta, int2tv (OSPF_MIN_LS_INTERVAL)) < 0)
@@ -163,10 +163,9 @@
 get_age (struct ospf_lsa *lsa)
 {
   int age;
-  struct timeval now;
 
-  gettimeofday (&now, NULL);
-  age = ntohs (lsa->data->ls_age) + tv_floor (tv_sub (now, lsa->tv_recv));
+  age = ntohs (lsa->data->ls_age) 
+        + tv_floor (tv_sub (recent_relative_time (), lsa->tv_recv));
 
   return age;
 }
@@ -229,7 +228,7 @@
   new->flags = 0;
   new->lock = 1;
   new->retransmit_counter = 0;
-  gettimeofday (&new->tv_recv, NULL);
+  new->tv_recv = recent_relative_time ();
   new->tv_orig = new->tv_recv;
   new->refresh_list = -1;
   
@@ -2460,9 +2459,6 @@
   
   new->data->ls_seqnum = lsa_seqnum_increment (lsa);
 
-  /* Record timestamp. */
-  gettimeofday (&new->tv_orig, NULL);
-
   /* Re-calculate checksum. */
   ospf_lsa_checksum (new->data);
 
@@ -3770,7 +3766,7 @@
 	delay = 0;
 
       current_index = ospf->lsa_refresh_queue.index +
-	(time (NULL) - ospf->lsa_refresher_started)/OSPF_LSA_REFRESHER_GRANULARITY;
+	(quagga_time (NULL) - ospf->lsa_refresher_started)/OSPF_LSA_REFRESHER_GRANULARITY;
       
       index = (current_index + delay/OSPF_LSA_REFRESHER_GRANULARITY)
 	% (OSPF_LSA_REFRESHER_SLOTS);
@@ -3829,7 +3825,7 @@
      modulus. */
   ospf->lsa_refresh_queue.index =
    ((unsigned long)(ospf->lsa_refresh_queue.index +
-		    (time (NULL) - ospf->lsa_refresher_started) /
+		    (quagga_time (NULL) - ospf->lsa_refresher_started) /
 		    OSPF_LSA_REFRESHER_GRANULARITY)) % OSPF_LSA_REFRESHER_SLOTS;
 
   if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
@@ -3867,7 +3863,7 @@
 
   ospf->t_lsa_refresher = thread_add_timer (master, ospf_lsa_refresh_walker,
 					   ospf, ospf->lsa_refresh_interval);
-  ospf->lsa_refresher_started = time (NULL);
+  ospf->lsa_refresher_started = quagga_time (NULL);
 
   for (ALL_LIST_ELEMENTS (lsa_to_refresh, node, nnode, lsa))
     ospf_lsa_refresh (ospf, lsa);
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index e3517cd..69bd48c 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -617,10 +617,10 @@
 
   /* Advance in NSM */
   if (next_state > nbr->state)
-    nbr->ts_last_progress = recent_time;
+    nbr->ts_last_progress = recent_relative_time ();
   else /* regression in NSM */
     {
-      nbr->ts_last_regress = recent_time;
+      nbr->ts_last_regress = recent_relative_time ();
       nbr->last_regress_str = ospf_nsm_event_str [event];
     }
 
@@ -747,7 +747,7 @@
   if (state == NSM_ExStart)
     {
       if (nbr->dd_seqnum == 0)
-	nbr->dd_seqnum = time (NULL);
+	nbr->dd_seqnum = quagga_time (NULL);
       else
 	nbr->dd_seqnum++;
 
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 6449e63..d7a3564 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -337,7 +337,9 @@
     return 0;
 
   /* We do this here so when we dup a packet, we don't have to
-     waste CPU rewriting other headers. */
+     waste CPU rewriting other headers.
+     
+     Note that quagga_time /deliberately/ is not used here */
   t = (time(NULL) & 0xFFFFFFFF);
   if (t > oi->crypt_seqnum)
     oi->crypt_seqnum = t;
@@ -444,7 +446,7 @@
 		  fired.  This is a small tweak to what is in the RFC,
 		  but it will cut out out a lot of retransmit traffic
 		  - MAG */
-		if (tv_cmp (tv_sub (recent_time, lsa->tv_recv), 
+		if (tv_cmp (tv_sub (recent_relative_time (), lsa->tv_recv), 
 			    int2tv (retransmit_interval)) >= 0)
 		  listnode_add (update, rn->info);
 	    }
@@ -1363,7 +1365,7 @@
 	  else
 	    {
 	      struct timeval t, now;
-	      gettimeofday (&now, NULL);
+	      quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
 	      t = tv_sub (now, nbr->last_send_ts);
 	      if (tv_cmp (t, int2tv (nbr->v_inactivity)) < 0)
 		{
@@ -1948,7 +1950,7 @@
 	    {
 	      struct timeval now;
 	      
-	      gettimeofday (&now, NULL);
+	      quagga_gettime (QUAGGA_CLK_MONOTONIC, &now);
 	      
 	      if (tv_cmp (tv_sub (now, current->tv_orig), 
 			  int2tv (OSPF_MIN_LS_ARRIVAL)) > 0)
@@ -3158,7 +3160,7 @@
   if (nbr->last_send)
     ospf_packet_free (nbr->last_send);
   nbr->last_send = ospf_packet_dup (op);
-  gettimeofday (&nbr->last_send_ts, NULL);
+  quagga_gettime (QUAGGA_CLK_MONOTONIC, &nbr->last_send_ts);
 }
 
 /* Re-send Database Description. */
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index e0f2565..3a1fa99 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -47,7 +47,7 @@
 
   new = XCALLOC (MTYPE_OSPF_ROUTE, sizeof (struct ospf_route));
 
-  new->ctime = time (NULL);
+  new->ctime = quagga_time (NULL);
   new->mtime = new->ctime;
   new->paths = list_new ();
   new->paths->del = (void (*) (void *))ospf_path_free;
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 7228d2d..a133d5f 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -1136,7 +1136,7 @@
   /* Increment SPF Calculation Counter. */
   area->spf_calculation++;
 
-  gettimeofday (&area->ospf->ts_spf, NULL);
+  quagga_gettime (QUAGGA_CLK_MONOTONIC, &area->ospf->ts_spf);
 
   if (IS_DEBUG_OSPF_EVENT)
     zlog_debug ("ospf_spf_calculate: Stop. %ld vertices",
@@ -1243,7 +1243,7 @@
     }
   
   /* XXX Monotic timers: we only care about relative time here. */
-  result = tv_sub (recent_time, ospf->ts_spf);
+  result = tv_sub (recent_relative_time (), ospf->ts_spf);
   
   elapsed = (result.tv_sec * 1000) + (result.tv_usec / 1000);
   ht = ospf->spf_holdtime * ospf->spf_hold_multiplier;
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 912f1d0..04e1df4 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2691,7 +2691,7 @@
   vty_out (vty, " SPF algorithm ");
   if (ospf->ts_spf.tv_sec || ospf->ts_spf.tv_usec)
     {
-      result = tv_sub (recent_time, ospf->ts_spf);
+      result = tv_sub (recent_relative_time (), ospf->ts_spf);
       vty_out (vty, "last executed %s ago%s",
                ospf_timeval_dump (&result, timebuf, sizeof (timebuf)),
                VTY_NEWLINE);
@@ -3157,7 +3157,8 @@
   vty_out (vty, " %d state changes%s", nbr->state_change, VTY_NEWLINE);
   if (nbr->ts_last_progress.tv_sec || nbr->ts_last_progress.tv_usec)
     {
-      struct timeval res = tv_sub (recent_time, nbr->ts_last_progress);
+      struct timeval res
+        = tv_sub (recent_relative_time (), nbr->ts_last_progress);
       vty_out (vty, "    Most recent state change statistics:%s",
                VTY_NEWLINE);
       vty_out (vty, "      Progressive change %s ago%s",
@@ -3166,7 +3167,8 @@
     }
   if (nbr->ts_last_regress.tv_sec || nbr->ts_last_regress.tv_usec)
     {
-      struct timeval res = tv_sub (recent_time, nbr->ts_last_regress);
+      struct timeval res
+        = tv_sub (recent_relative_time (), nbr->ts_last_regress);
       vty_out (vty, "      Regressive change %s ago, due to %s%s",
                ospf_timeval_dump (&res, timebuf, sizeof(timebuf)),
                (nbr->last_regress_str ? nbr->last_regress_str : "??"),
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 95615e4..a1f0f01 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -202,7 +202,7 @@
   new->lsa_refresh_interval = OSPF_LSA_REFRESH_INTERVAL_DEFAULT;
   new->t_lsa_refresher = thread_add_timer (master, ospf_lsa_refresh_walker,
 					   new, new->lsa_refresh_interval);
-  new->lsa_refresher_started = time (NULL);
+  new->lsa_refresher_started = quagga_time (NULL);
 
   if ((new->fd = ospf_sock_init()) < 0)
     {
@@ -1317,7 +1317,7 @@
     return 1;
 
   time_left = ospf->lsa_refresh_interval -
-    (time (NULL) - ospf->lsa_refresher_started);
+    (quagga_time (NULL) - ospf->lsa_refresher_started);
   
   if (time_left > interval)
     {
@@ -1336,7 +1336,7 @@
   int time_left;
 
   time_left = ospf->lsa_refresh_interval -
-    (time (NULL) - ospf->lsa_refresher_started);
+    (quagga_time (NULL) - ospf->lsa_refresher_started);
 
   if (time_left > OSPF_LSA_REFRESH_INTERVAL_DEFAULT)
     {
@@ -1657,5 +1657,5 @@
   om = &ospf_master;
   om->ospf = list_new ();
   om->master = thread_master_create ();
-  om->start_time = time (NULL);
+  om->start_time = quagga_time (NULL);
 }
