From: Harlan Stenn Date: Fri, 22 Oct 2010 18:57:46 +0000 (-0400) Subject: [Bug 1671] Audoomatic delay calibration is sometimes inaccurate X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=666cfbf7d5535f4ab7f8e8a48797fe4020c67a02;p=thirdparty%2Fntp.git [Bug 1671] Audoomatic delay calibration is sometimes inaccurate bk: 4cc1deaahfmas9tAI3K4a4CZh5XLDQ --- diff --git a/ChangeLog b/ChangeLog index b56908eab3..21f76d8149 100644 --- 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 * [Bug 1669] from 4.2.6p3-RC5: NTP fails to compile on IBM AIX 5.3. * [Bug 1670] Fix peer->bias and broadcastdelay. diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 41c61da530..aac517707b 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -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 diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index c52fd8e369..7c9e414ba8 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -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;