Talking directly to root servers

Hi,

I have an application linked against libunbound-1.4.12. Although
resolv.conf does list some local nameservers, including 127.0.0.1,
strace shows libunbound talking directly to the various
root-servers.net hosts looking for answers.

The online documentation appears to suggest /etc/resolv.conf will be
read and used if ub_ctx_resolvconf() is passed a NULL filename (or, of
course, if it's passed "/etc/resolv.conf"), but it's unclear what
happens if this is never called. Is it the case that I have to call
this to use resolv.conf and a hard-coded list of root servers is used
otherwise?

Thanks,
-MSK

Hi Murray,

Hi Murray,

Hi Wouter,

Yes. It uses the root servers. If you call resolvconf() it uses
resolv.conf.

Could this detail be added to the API documentation?

Thanks,
-MSK

Hi Murray,

I was looking at http://www.unbound.net/documentation/libunbound.html.
Adding a note about this default behaviour to the description of
ub_ctx_resolvconf() would have saved me a few hours of debugging this
evening. :slight_smile:

Thanks,

-MSK