summaryrefslogtreecommitdiff
path: root/ospfd/ospf_vty.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-08-27 06:49:29 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-08-27 06:49:29 +0000
commit2518efd15b75687d4791a5eb4b0d7febc36cffbc (patch)
tree075b833f292ba3e64117a9ffb440578c70be5a2a /ospfd/ospf_vty.c
parentdb9c0df934e62835bc09604a7ae7932693b4254a (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_vty.c')
-rw-r--r--ospfd/ospf_vty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 912f1d09..04e1df46 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2691,7 +2691,7 @@ DEFUN (show_ip_ospf,
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 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
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 @@ show_ip_ospf_neighbor_detail_sub (struct vty *vty, struct ospf_interface *oi,
}
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 : "??"),