ntp: disable maxdelayratio in interleaved/symmetric mode

It's too unreliable and the maxdelaydevratio test should work better
anyway.
This commit is contained in:
Miroslav Lichvar 2016-12-12 09:11:49 +01:00
parent 9568ff3f06
commit b7bd7469b7
2 changed files with 7 additions and 5 deletions

View file

@ -110,7 +110,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. maxdelayratio times the minimum delay, it will be rejected. This option works
only in the *server* directive when not in the interleaved mode.
*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

@ -1453,11 +1453,12 @@ 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 that the ratio of the round trip delay to the /* Test B requires in the basic client mode that the ratio of the round
minimum one currently in the stats data register is less than an trip delay to the minimum one currently in the stats data register is
administrator-defined value */ less than an administrator-defined value */
testB = inst->max_delay_ratio <= 1.0 || testB = inst->max_delay_ratio <= 1.0 ||
(delay - dispersion) / SST_MinRoundTripDelay(stats) <= inst->max_delay_ratio; !(inst->mode == MODE_CLIENT && !interleaved_packet &&
(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
one in the stats data register to the standard deviation of the offsets one in the stats data register to the standard deviation of the offsets