[EXTERNAL] Re: Win 11 Cygwin dns-utils "dig" and "host": Option -6 causes command to timeout

Lavrentiev, Anton (NIH/NLM/NCBI) [C] lavr@ncbi.nlm.nih.gov
Thu Feb 15 19:40:06 GMT 2024


> Maybe Cygwin should just ask Windows for the name servers?

Cygwin does ask Windows, by default, when gethostbyname() or getnameinfo() are used (which most applications do).
The lookup does not depend on /etc/resolv.conf unless you configured it to do so in "options" in there.
(That would be "options osquery".)  So generally, it's Windows which actually sends a DNS request
and processes the result back (Cygwin then uses that information).

"host" and "dig" are special beasts, in that respect, as they don't use the Windows DNS query API
but form and send DNS requests on their own, which is why they need a properly configured
/etc/resolv.conf file, to know what servers to use.

HTH,

Anton Lavrentiev
Contractor NIH/NLM/NCBI



More information about the Cygwin mailing list