mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:45:07 -05:00
Add test for ratio of increase in delay to stddev
Require that the ratio of the increase in delay from the minimum one in the stats data register to the standard deviation of the offsets in the register is less than maxdelaydevratio or the difference between measured offset and predicted offset is larger than the increase in delay. In the allowed delay increase is included also skew and maximum clock frequency error. maxdelaydevratio is 10.0 by default.
This commit is contained in:
8
client.c
8
client.c
@@ -963,6 +963,11 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.params.max_delay_dev_ratio != SRC_DEFAULT_MAXDELAYDEVRATIO) {
|
||||
fprintf(stderr, "Option maxdelaydevratio not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
msg->data.ntp_source.port = htonl((unsigned long) data.port);
|
||||
UTI_IPHostToNetwork(&data.ip_addr, &msg->data.ntp_source.ip_addr);
|
||||
msg->data.ntp_source.minpoll = htonl(data.params.minpoll);
|
||||
@@ -998,6 +1003,9 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
case CPS_BadPresend:
|
||||
fprintf(stderr, "Unreadable presend value\n");
|
||||
break;
|
||||
case CPS_BadMaxdelaydevratio:
|
||||
fprintf(stderr, "Unreadable max delay dev ratio value\n");
|
||||
break;
|
||||
case CPS_BadMaxdelayratio:
|
||||
fprintf(stderr, "Unreadable max delay ratio value\n");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user