ntp: enable maxdelayratio test in interleaved client mode

With more accurate delay in interleaved mode the test should now be as
reliable as in basic mode.
This commit is contained in:
Miroslav Lichvar 2017-08-01 10:01:53 +02:00
parent 4f1fc1ee78
commit e1645966ec
2 changed files with 6 additions and 6 deletions

View 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

View 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