ntp: include precision in maxdelay test

This commit is contained in:
Miroslav Lichvar 2017-01-19 11:31:26 +01:00
parent 97d4203354
commit b198d76676

View file

@ -1475,7 +1475,7 @@ receive_packet(NCR_Instance inst, NTP_Local_Address *local_addr,
processing time is sane, and in the interleaved symmetric mode that processing time is sane, and in the interleaved symmetric mode that
the delay is not longer than half of the remote polling interval to the delay is not longer than half of the remote polling interval to
detect missed packets */ detect missed packets */
testA = delay - dispersion <= inst->max_delay && testA = delay - dispersion <= inst->max_delay && precision <= inst->max_delay &&
!(inst->mode == MODE_CLIENT && server_interval > MAX_SERVER_INTERVAL) && !(inst->mode == MODE_CLIENT && server_interval > MAX_SERVER_INTERVAL) &&
!(inst->mode == MODE_ACTIVE && interleaved_packet && !(inst->mode == MODE_ACTIVE && interleaved_packet &&
delay > UTI_Log2ToDouble(message->poll - 1)); delay > UTI_Log2ToDouble(message->poll - 1));