]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
keys: don't fudge authentication delay
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 23 Sep 2019 15:58:27 +0000 (17:58 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 24 Sep 2019 09:35:51 +0000 (11:35 +0200)
Remove the magic constant compensating for copying, conversions, etc.
It cannot possibly be accurate on all hardware. The delay is supposed to
be a minimum delay.

keys.c

diff --git a/keys.c b/keys.c
index 7eb5cb37b8dc5da57f9444d57b04197db5673edb..44a3f7a0ce93fb21f1f2c72fa6fba77ec8d3a3de 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -121,8 +121,7 @@ determine_hash_delay(uint32_t key_id)
       min_diff = diff;
   }
 
-  /* Add on a bit extra to allow for copying, conversions etc */
-  nsecs = 1.0625e9 * min_diff;
+  nsecs = 1.0e9 * min_diff;
 
   DEBUG_LOG("authentication delay for key %"PRIu32": %d nsecs", key_id, nsecs);