mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 02:25:06 -05:00
Add minstratum option
Stratum in received packets is raised to the configured minimum.
This commit is contained in:
committed by
Miroslav Lichvar
parent
fe4b661fe7
commit
c8fe69c956
8
client.c
8
client.c
@@ -909,6 +909,11 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.params.min_stratum) {
|
||||
fprintf(stderr, "Option minstratum 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);
|
||||
@@ -951,6 +956,9 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
case CPS_BadKey:
|
||||
fprintf(stderr, "Unreadable key value\n");
|
||||
break;
|
||||
case CPS_BadMinstratum:
|
||||
fprintf(stderr, "Unreadable minstratum value\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user