[pkg-ntp-maintainers] Bug#683061: Bug#683061: Bug#683061: bug report #683061

Kurt Roeckx kurt at roeckx.be
Tue Jul 2 13:57:17 UTC 2013


On Tue, Jul 02, 2013 at 03:32:13PM +0200, Thomas Hood wrote:
> On Tue, Jul 2, 2013 at 1:59 PM, Kurt Roeckx <kurt at roeckx.be> wrote:
> 
> > Do you know NXDOMAIN returns?  I think it returns just the same?
> >
> 
> 
> I don't immediately see how getaddrinfo() alone can be used to tell
> whether or not an actual NXDOMAIN was received. A test with a small
> C program reveals that retval -11 errno 2 is returned both in the
> NXDOMAIN case and in the case where no nameservers could be found.

And I think that a nameserver not found should never have resulted
in that return value, since it's not a permanent error.

> > So ntpd should just keep trying to resolv invalid hostnames?
> >
> 
> 
> That may seem like a waste of resources, but
> 
> * Computers are mobile these days and DNS also changes from the
> perspective of those computers. A laptop may connect sometimes
> to a LAN where the domain name ntp.somecorp.private resolves to
> the address of a time server.  On other LANs this name does not exist.

Do you expect the DHCP server on the LAN then to set that ntp
server?  Currently this would now result in ntpd getting restarted
by dhcp and should get you a working ntp server.

If it's not configured by DHCP, that means that the admin changed
the default. This would now probably only work when it never got
a error that it's an invalid hostname.  And that's probably only
the case when the network goes up the first time when on that LAN.

But I see no good reason not to use DHCP for this.

> * If the retry period is on the order of seconds then the resources
> used aren't very significant.

That of course depends on the number of misconfigured clients, but
probably shouldn't really be an issue.  This can even be a long
delay in the ussual case.

> I suppose the question really is, when should the admin be
> notified that there is a problem?  Good question.  Is there something
> wrong with ntpd just logging resolution failures and leaving it at that?

But do you want it to log this every second?  Or do you have some
trigger for when it should log this again? (For instance on
interface/ip change.)


Kurt



More information about the pkg-ntp-maintainers mailing list