Helmut Grohne wrote: > All that I am aiming for is to declare one of the following practises > as broken: > > * Treating an empty /etc/resolv.conf as a permanent error or failing > to discover changes in /etc/resolv.conf later on. > * Changing /etc/resolv.conf during startup of a local dns cache.
I think that the first one is broken. If name service is unavailable just after boot then that should not be treated as a permanent error. An answer from a nameserver that a domain name does not exist might more reasonably be treated as a permanent error, but that is disputable. In a world where computers move among LANs, DNS does not always look the same, so it's not unreasonable to retry periodically even after being told NXDOMAIN. A problem is that getaddrinfo() doesn't distinguish in its return status between "couldn't reach a nameserver" and "nameserver says the name doesn't exist". Either way it returns EAI_SYSTEM with errno=2 (ENOENT). > > I am not aware that there is anything (except perhaps ntpd) that needs to > > be fixed. > > It is true, that ntpd can work around this issue. Still it appears like > a bad design to treat EAI_SYSTEM as a temporary error. Can you explain why you think that? -- Thomas