]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: enable maxdelayratio test in interleaved client mode
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 1 Aug 2017 08:01:53 +0000 (10:01 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 9 Aug 2017 07:57:13 +0000 (09:57 +0200)
With more accurate delay in interleaved mode the test should now be as
reliable as in basic mode.

doc/chrony.conf.adoc
ntp_core.c

index 3607c83cfe6af172167302db3b237046b6fb1eba..62f86fca34500fde0b890bf0958bb36e9a1a360e 100644 (file)
@@ -115,8 +115,8 @@ round-trip delay of 0.3 seconds or more should be ignored. The default value is
 This option is similar to the maxdelay option above. *chronyd* keeps a record
 of the minimum round-trip delay amongst the previous measurements that it has
 buffered. If a measurement has a round trip delay that is greater than the
-maxdelayratio times the minimum delay, it will be rejected. This option works
-only in the *server* directive when not in the interleaved mode.
+maxdelayratio times the minimum delay, it will be rejected. This option does
+not work in the *peer* directive.
 *maxdelaydevratio* _ratio_:::
 If a measurement has a ratio of the increase in the round-trip delay from the
 minimum delay amongst the previous measurements to the standard deviation of
index 4c3e9b6b67a6f3adcf222812c6ebbbfe953c73b1..2a625378a230b05948a1759e5e49d6c67d6e3e8c 100644 (file)
@@ -1506,11 +1506,11 @@ receive_packet(NCR_Instance inst, NTP_Local_Address *local_addr,
             !(inst->mode == MODE_ACTIVE && interleaved_packet &&
               delay > UTI_Log2ToDouble(message->poll - 1));
 
-    /* Test B requires in the basic client mode that the ratio of the round
-       trip delay to the minimum one currently in the stats data register is
-       less than an administrator-defined value */
+    /* Test B requires in client mode that the ratio of the round trip delay
+       to the minimum one currently in the stats data register is less than an
+       administrator-defined value */
     testB = inst->max_delay_ratio <= 1.0 ||
-            !(inst->mode == MODE_CLIENT && !interleaved_packet &&
+            !(inst->mode == MODE_CLIENT &&
               (delay - dispersion) / SST_MinRoundTripDelay(stats) > inst->max_delay_ratio);
 
     /* Test C requires that the ratio of the increase in delay from the minimum