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 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 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 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 maxdelayratio times the minimum delay, it will be rejected. This option does
only in the *server* directive when not in the interleaved mode. not work in the *peer* directive.
*maxdelaydevratio* _ratio_::: *maxdelaydevratio* _ratio_:::
If a measurement has a ratio of the increase in the round-trip delay from the 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 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 && !(inst->mode == MODE_ACTIVE && interleaved_packet &&
delay > UTI_Log2ToDouble(message->poll - 1)); delay > UTI_Log2ToDouble(message->poll - 1));
/* Test B requires in the basic client mode that the ratio of the round /* Test B requires in client mode that the ratio of the round trip delay
trip delay to the minimum one currently in the stats data register is to the minimum one currently in the stats data register is less than an
less than an administrator-defined value */ administrator-defined value */
testB = inst->max_delay_ratio <= 1.0 || 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); (delay - dispersion) / SST_MinRoundTripDelay(stats) > inst->max_delay_ratio);
/* Test C requires that the ratio of the increase in delay from the minimum /* Test C requires that the ratio of the increase in delay from the minimum