]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1671] Audoomatic delay calibration is sometimes inaccurate
authorHarlan Stenn <stenn@ntp.org>
Fri, 22 Oct 2010 18:57:46 +0000 (14:57 -0400)
committerHarlan Stenn <stenn@ntp.org>
Fri, 22 Oct 2010 18:57:46 +0000 (14:57 -0400)
bk: 4cc1deaahfmas9tAI3K4a4CZh5XLDQ

ChangeLog
ntpd/ntp_loopfilter.c
ntpd/ntp_proto.c

index b56908eab328150aa2f809185042a512c2fb376e..21f76d8149e3dc7322b36ae75f687950800e870d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 1671] Audoomatic delay calibration is sometimes inaccurate.
 (4.2.7p68) 2010/10/22 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 1669] from 4.2.6p3-RC5: NTP fails to compile on IBM AIX 5.3.
 * [Bug 1670] Fix peer->bias and broadcastdelay.
index 41c61da530b42637768d0a4e4ba94386b5108c4c..aac517707bac689db803fb46fee9e2319c66eca8 100644 (file)
@@ -708,7 +708,7 @@ adj_host_clock(
        sys_rootdisp += clock_phi;
        if (fabs(clock_offset) < CLOCK_FLOOR)
                freq_cnt = 0;
-       else if (freq_cnt > 0)
+       else if (freq_cnt > 0 && sys_leap != LEAP_NOTINSYNC)
                freq_cnt--;
 
 #ifndef LOCKCLOCK
index c52fd8e3693f46b02b47bdd8dc0351c794089eeb..7c9e414ba81f54f2ae88ac52b2c1ba8de043882c 100644 (file)
@@ -1548,7 +1548,7 @@ process_packet(
                 */
                if (peer->cast_flags & MDF_BCLNT) {
                        peer->cast_flags &= ~MDF_BCLNT;
-                       peer->delay = (peer->offset - p_offset) * 2;
+                       peer->delay = fabs(peer->offset - p_offset) * 2;
                }
                p_del = peer->delay;
                p_offset += p_del / 2;