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

Jim Garrison jhg@jhmg.net
Thu Feb 15 17:56:37 GMT 2024


On 2/14/2024 17:08, Brian Inglis via Cygwin wrote:
> On 2024-02-14 16:28, Jim Garrison via Cygwin wrote:
>> Win 11 Cygwin "dig" and "host": Option -6 causes command to hang
>>

[snip]


> Ditto!
> 
> Without IPv6 nameservers in /etc/resolv.conf I get:
> 
> $ host -6 google.com
> ;; connection timed out; no servers could be reached
> Failing assertion due to probable leaked memory in context 0xa00020be0 
> ("dig") (stats[4].gets == 1).
> mem.c:1121: INSIST(ctx->stats[i].gets == 0U) failed.
> 
> but with IPv6 nameservers in /etc/resolv.conf I get:
> 
> $ host -6 google.com
> google.com has address 142.251.211.238
> google.com has IPv6 address 2607:f8b0:400a:804::200e
> google.com mail is handled by 10 smtp.google.com.
> 
[snip]
> 
> I added a Cygwin postinstall script:
> 
>      /etc/postinstall/0p_l_etc_resolv_conf.dash
> 
> to create resolv.conf from `ipconfig /all` DNS servers, an internal list 
> of open public DNS servers, and search domains, update:
> 
>      /var/run/resolvconf/resolv.conf
> 
> when changed, and `ln -frsvt /etc/`, also run from a Scheduled Task on 
> System Restart.

Unfortunately, this is only a partial solution because your delegated 
prefix can change if your ISP changes it.  The firewall knows how to 
track this, and will issue a new LAN IP address at the next lease 
expiration.  But, the firewall is also providing name resolution, and 
after its LAN prefix changes (and the grace period expires) Cygwin's 
name resolultion would be left pointing to a non-existent address.

Also, IPv4 resolution does not seem to depend on resolv.conf, and 
Windows clearly does not depend on resolv.conf for either IPv4 or IPv6. 
Maybe Cygwin should just ask Windows for the name servers?

As a counterpoint I note that on dual stack Linux one DOES need an extra 
daemon (resolvconf or systemd-resolved) to manage merging of IPv4 and 
IPv6 DHCP configurations.  Without one of those, the IPv6 client 
overwrites the resolv.conf created by the IPv4 client.

Maybe Cygwin needs the equivalent of resolvconf?  I found references to 
a file called resolvconf in the sources/devel packages for unbound, but 
unbound itself doesn't seem to contain anything with that name.  Also 
unbound seems to be currently unmaintained.

-- 
Jim Garrison
jhg@acm.org



More information about the Cygwin mailing list