summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_lsa.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-07-28 17:23:36 +0200
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-28 13:27:47 +0200
commita05d8b7ae46410c6782729375090306fd56b4561 (patch)
tree6cb6128cae913e6f6b5044537f0752031c1aae1a /ospfd/ospf_lsa.c
parentbgpd: ditch unused bgp_node_*() functions (diff)
downloadfrr-a05d8b7ae46410c6782729375090306fd56b4561.tar.xz
frr-a05d8b7ae46410c6782729375090306fd56b4561.zip
ospfd: monotonic clock for lsa_refresher_started
ospf->lsa_refresher_started is only used in relative timing to itself; replace with monotonic clock which is appropriate for this. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r--ospfd/ospf_lsa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index ec0eab5f0..7e34e5dd9 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -3731,7 +3731,7 @@ ospf_refresher_register_lsa (struct ospf *ospf, struct ospf_lsa *lsa)
*/
delay = (random() % (max_delay - min_delay)) + min_delay;
- current_index = ospf->lsa_refresh_queue.index + (quagga_time (NULL)
+ current_index = ospf->lsa_refresh_queue.index + (quagga_monotime ()
- ospf->lsa_refresher_started)/OSPF_LSA_REFRESHER_GRANULARITY;
index = (current_index + delay/OSPF_LSA_REFRESHER_GRANULARITY)
@@ -3795,7 +3795,7 @@ ospf_lsa_refresh_walker (struct thread *t)
modulus. */
ospf->lsa_refresh_queue.index =
((unsigned long)(ospf->lsa_refresh_queue.index +
- (quagga_time (NULL) - ospf->lsa_refresher_started)
+ (quagga_monotime () - ospf->lsa_refresher_started)
/ OSPF_LSA_REFRESHER_GRANULARITY))
% OSPF_LSA_REFRESHER_SLOTS;
@@ -3836,7 +3836,7 @@ ospf_lsa_refresh_walker (struct thread *t)
ospf->t_lsa_refresher = thread_add_timer (master, ospf_lsa_refresh_walker,
ospf, ospf->lsa_refresh_interval);
- ospf->lsa_refresher_started = quagga_time (NULL);
+ ospf->lsa_refresher_started = quagga_monotime ();
for (ALL_LIST_ELEMENTS (lsa_to_refresh, node, nnode, lsa))
{