options timeout in resolv.conf does not work in stable/10

Vitaly Magerya vmagerya at gmail.com
Wed Feb 19 13:49:07 UTC 2014


Dmitry Sivachenko wrote:
> I have the following /etc/resolv.conf:
> 
> domain domain.my
> nameserver IP1
> nameserver IP2
> options timeout:1
> 
> 
> On FreeBSD-9-STABLE, if IP1 is down, I get a dns response from IP2 after 1 second.
> On FreeBSD-10, I get dns response from IP2 after 10 seconds.
> 
> I see no changes in resolv.conf(5) man-page about timeout parameter.
> 
> What am I missing?

Are you using host(1) command for this? If so, host(1) in
10-RELEASE does not respect 'options' from resolv.conf (there's
a note about this in it's man page); the system resolver (that
is, anything based on getaddrinfo(3)) should not be affected
though.

The reason for this regression is that host(1) is now based on
the ldns library, which doesn't currently parse the 'options'
directive (e.g. see [1]).

The solution is to add '-w 1' to the list of host(1) options.
Or to push the ldns folks to fix this.

[1] http://git.nlnetlabs.nl/ldns/tree/resolver.c?id=f328ba0ccc3c0733d0451d5059b50e502206923a#n838


More information about the freebsd-stable mailing list