mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 03:45:07 -05:00
ntp: clamp remote stratum
Don't set the remote stratum (used for polling adjustments) to values larger than 16.
This commit is contained in:
@@ -1759,7 +1759,7 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
|
|||||||
if (valid_packet) {
|
if (valid_packet) {
|
||||||
inst->remote_poll = message->poll;
|
inst->remote_poll = message->poll;
|
||||||
inst->remote_stratum = message->stratum != NTP_INVALID_STRATUM ?
|
inst->remote_stratum = message->stratum != NTP_INVALID_STRATUM ?
|
||||||
message->stratum : NTP_MAX_STRATUM;
|
MIN(message->stratum, NTP_MAX_STRATUM) : NTP_MAX_STRATUM;
|
||||||
|
|
||||||
inst->prev_local_poll = inst->local_poll;
|
inst->prev_local_poll = inst->local_poll;
|
||||||
inst->prev_tx_count = inst->tx_count;
|
inst->prev_tx_count = inst->tx_count;
|
||||||
|
|||||||
Reference in New Issue
Block a user