Subject: bin/31577: ntpd_initres mechanism to keep trying failed DNS lookups broke 1.6 -> 2.0 (ntpd bug#504)
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <carton@Ivy.NET>
List: netbsd-bugs
Date: 10/13/2005 19:32:00
>Number:         31577
>Category:       bin
>Synopsis:       ntpd_initres mechanism to keep trying failed DNS lookups broke 1.6 -> 2.0 (ntpd bug#504)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 13 19:32:00 +0000 2005
>Originator:     Miles Nordin
>Release:        NetBSD 3.0_BETA
>Organization:
Ivy Ministries
>Environment:
System: NetBSD castrovalva 3.0_BETA NetBSD 3.0_BETA (CASTROVALVA-$Revision: 1.10 $) #0: Sun Sep 11 15:08:04 EDT 2005 carton@castrovalva:/export/src/sys/arch/alpha/compile/CASTROVALVA alpha
Architecture: alpha
Machine: alpha
>Description:
When ntpd starts, it forks a child to stroke the configuration file repeatedly
and retry DNS resolution of any host that didn't immediately resolve at startup.
In ntpd 4.0.99 (NetBSD 1.6), this child was apparently the _only_ thing that did DNS
resolution, and the child would apparently contact the master ntpd over
127.0.0.1 like ntpdc, so saying 'restrict default nomodify' would stop DNS
lookups from working entirely.

In ntpd 4.2.0, 'restrict default nomodify' no longer stops DNS resolution from
working entirely, but with or without this statement DNS resolution is never
retried.  The child forks, but doesn't seem to actually do anything.  You only
get one shot at DNS resolution, at startup.

>How-To-Repeat:

1. use a machine where resolv.conf points to localhost
2. stop named
3. restart ntpd
4. start named

you'll find no servers configured by hostname come up in ntpq 'peers'.

5. restart ntpd

all the servers will resolve and come up now.

>Fix:

Unknown