]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: fix maxdelayratio test
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Jan 2015 11:49:02 +0000 (12:49 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Jan 2015 11:49:02 +0000 (12:49 +0100)
This was broken in commit 8fbfe55e.

ntp_core.c

index 8781427e82fffdf1bbc25f7fd3f76c3cf3e6672b..6550f8caa1240d3628a920717bce0af1a3cfdcdb 100644 (file)
@@ -1243,7 +1243,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
        minimum one currently in the stats data register is less than an
        administrator-defined value */
     testB = inst->max_delay_ratio <= 1.0 ||
-            delay / SRC_MinRoundTripDelay(inst->source) > inst->max_delay_ratio;
+            delay / SRC_MinRoundTripDelay(inst->source) <= inst->max_delay_ratio;
 
     /* Test C requires that the ratio of the increase in delay from the minimum
        one in the stats data register to the standard deviation of the offsets