ntp: clamp remote stratum
Don't set the remote stratum (used for polling adjustments) to values larger than 16.
This commit is contained in:
parent
81f7f6ddf0
commit
635a9d3f5a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue