Subject: Re: bin/31580: 'ntptime' no longer reports ERROR and UNSYNC when ntpd isn't synchronized (ntpd bug #506)
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Miles Nordin <carton@Ivy.NET>
List: netbsd-bugs
Date: 10/17/2005 23:04:01
The following reply was made to PR bin/31580; it has been noted by GNATS.
From: Miles Nordin <carton@Ivy.NET>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/31580: 'ntptime' no longer reports ERROR and UNSYNC when ntpd isn't synchronized (ntpd bug #506)
Date: Mon, 17 Oct 2005 19:03:20 -0400
this patch works for me. David Mills hasn't reviewed it. He says he
has verified there is no bug on FreeBSD 5.4, but I can verify that
FreeBSD 5.4 *does* have the bug.
so, I don't know. He's said he wants nothing more to do with it, and
individual OSes should fix it. However, if this patch is right, the
bug is clearly in the main ntpd distribution not the OS code, and is a
regression introduced when the LOOP_DRIFTINIT and LOOP_DRIFTCOMP cases
were split apart between 4.0.99 and 4.2.0.
-----8<-----
Index: ntp_loopfilter.c
===================================================================
RCS file: /scratch/cvsroot/netbsd/src/dist/ntp/ntpd/ntp_loopfilter.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 ntp_loopfilter.c
--- ntp_loopfilter.c 12 Dec 2003 11:11:19 -0000 1.1.1.3
+++ ntp_loopfilter.c 17 Oct 2005 02:52:41 -0000
@@ -924,7 +924,7 @@
ntv.modes = MOD_OFFSET | MOD_FREQUENCY;
if (kern_enable) {
ntv.modes |= MOD_STATUS;
- ntv.status = STA_PLL;
+ ntv.status = STA_PLL | STA_UNSYNC;
ntv.freq = (int32)(drift_comp *
65536e6);
}
-----8<-----