Subject: Re: ntpd
To: None <>
From: Miles Nordin <carton@Ivy.NET>
List: current-users
Date: 10/12/2005 17:19:51
Content-Type: text/plain; charset=US-ASCII

>>>>> "mn" == Miles Nordin <carton@Ivy.NET> writes:

    mn> so, that feature is not working.  I checked FreeBSD, which is
    mn> also ntp 4.20, and it's broken over there, too.

I checked a NetBSD 1.6.1_STABLE machine, which is ntpd 4.0.99i.  The
deferred name lookup feature _does_ work over there.

I thought DNS was broken on that machine altogether, which was what I
was vaguely remembering, but it turned out the real cause was:

restrict default nomodify

in /etc/ntp.conf which did indeed made 'server <hostname>' not work at
all.  I added 'restrict #empty restrictions' and both
nameservice and deferred nameservice retrying started working again on
NetBSD 1.6.  Adding the same line to NetBSD 3.0 doesn't help---you
only get one shot at nameservice, at startup.

I noticed some other regressions between 4.0.99i and 4.20.  Here's the
full list:

 * ntpd_initres mechanism to keep trying failed DNS lookups broke

 * ntpq does not do reverse lookup for the 'refid' field at all.
   There was some changelog to stop lookup for fake refclock
   127.127.x.x addresses, but it's not reverse-looking-up any

 * 'ntptime' no longer reports when ntp isn't working.  For example,
   when ntpd is not running at all, a NetBSD 1.6 system reports:

ntp_gettime() returns code 5 (ERROR)
  time c6f7f9fe.f87b7000  Wed, Oct 12 2005 17:09:18.970, (.970634),
  maximum error 108048 us, estimated error 16 us.
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset -1548.000 us, frequency 74.770 ppm, interval 1 s,
  maximum error 108048 us, estimated error 16 us,
  status 0x41 (PLL,UNSYNC),
  time constant 6, precision 1.000 us, tolerance 512 ppm,

   while a NetBSD 3.0_BETA system reports:

ntp_gettime() returns code 0 (OK)
  time c6f7fa2f.1b7f6000  Wed, Oct 12 2005 21:10:07.107, (.107412),
  maximum error 1022840 us, estimated error 16 us
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.000 us, frequency -332.393 ppm, interval 1 s,
  maximum error 1022840 us, estimated error 16 us,
  status 0x1 (PLL),
  time constant 0, precision 1.000 us, tolerance 1576 ppm,

   so the gettime ERROR and the status UNSYNC seem to never be used
   any more.  Also, when ntpd is running, but the clock is off by 8
   seconds, NetBSD 3.0 ntptime(8) also reports OK, while NetBSD 1.6
   reports ERROR in that case.  In general it reports ERROR even after
   ntpd is started, until ntpd declares the clock

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: GnuPG v1.2.6 (NetBSD)