diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-08-27 06:49:29 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-08-27 06:49:29 +0000 |
commit | 2518efd15b75687d4791a5eb4b0d7febc36cffbc (patch) | |
tree | 075b833f292ba3e64117a9ffb440578c70be5a2a /ospfd/ospf_nsm.c | |
parent | db9c0df934e62835bc09604a7ae7932693b4254a (diff) |
[ospfd] Bug #134, ospfd should be more robust to backward time change
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.
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r-- | ospfd/ospf_nsm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c index e3517cdd..69bd48ce 100644 --- a/ospfd/ospf_nsm.c +++ b/ospfd/ospf_nsm.c @@ -617,10 +617,10 @@ nsm_notice_state_change (struct ospf_neighbor *nbr, int next_state, int event) /* 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 @@ nsm_change_state (struct ospf_neighbor *nbr, int state) if (state == NSM_ExStart) { if (nbr->dd_seqnum == 0) - nbr->dd_seqnum = time (NULL); + nbr->dd_seqnum = quagga_time (NULL); else nbr->dd_seqnum++; |