]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: include precision in maxdelay test
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 19 Jan 2017 10:31:26 +0000 (11:31 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 23 Jan 2017 14:58:55 +0000 (15:58 +0100)
ntp_core.c

index 169e2889f87baf8e6cc867d03faa0339ffc36e7e..4f911d638c8ba14f304ed972a4461d8ffa5c4286 100644 (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
        the delay is not longer than half of the remote polling interval to
        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_ACTIVE && interleaved_packet &&
               delay > UTI_Log2ToDouble(message->poll - 1));