X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB253386C5AF
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1708019865;
	bh=onju0lsKPJgtNrHKQPSpm2vRC8q7Wb8uPgtikWdy+Nw=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=gExie4qTQkn46EsfTgkonWSQIZYwI17ycGYNae8V5Wg4w2GNhAtlymgk34KM1R+s0
	 eUqFN/ay9AfTRXa3dWoKArgliS1x5DDWMfLDjfChDs0eFICfs9btZSoHFNnTLrUjp+
	 qxHpFGx+riEjmDp+ZXYRg2zIhIrTSkVlgm2uH+bE=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 893E6386C589
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 893E6386C589
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708019802; cv=none;
 b=lgte9DBQ5flPoZANCNYA33XJ8rEjsSfgh0LrZOsBcx4Lh+GqpG+cl5qxvNJN959zISc8QCPXMDTyMs1cE7ezAfifOJWNjUx02Ee7jMPmdLjUFk6rXSJo2UhZ8cij0mWvPm4Kop9gtaOmsWGzaUCuITVJxJqek7yQ+Gey0sr24Iw=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1708019802; c=relaxed/simple;
 bh=5YpXU/RNjrTtI8sA4Skoa+lbrgluXnUegBCUumNJuFM=;
 h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
 b=cLuAU+eS/jzdZ3vNGtlzULZncDVVRT35QFQsiaejc/6S7qDZRsv32s/kn3uwRBBYtyiLcAQu8mW1d4RM7fX8TA6LyK9Ygp7kVewsZYcPhmLf+d0d8X1ynwop9+RWQr4SqqHSufqgVYfvAkXYI9uquOojdqhFe1bHyFzGUgSi/Dk=
ARC-Authentication-Results: i=1; server2.sourceware.org
Message-ID: <02234806-fd8b-4a4f-885f-c6d294603c83@jhmg.net>
Date: Thu, 15 Feb 2024 09:56:37 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Win 11 Cygwin dns-utils "dig" and "host": Option -6 causes
 command to timeout
Content-Language: en-US
To: cygwin@cygwin.com
References: <00209ed4-b4a3-4125-9a8a-32ea0fcefc7d@jhmg.net>
 <c874178f-dc16-4725-94e5-5a92f98e424e@SystematicSW.ab.ca>
Autocrypt: addr=jhg@jhmg.net; keydata=
 xsDiBDWEWocRBADfF9Q6lhkW9USReZ96cBC93kq3bblkNslVAZzm9itW7sAEzHbydIZ9hZjm
 e93UxUPzg1zGXX9xrdQy0+lHxkj2wvzgEF50Kqjft6KAd8AqiNmcbu5Q+/SHIP87C/tD/wWO
 TX7I99ekggy+5a6illN/s7MhuPIsMtt3ofFFcuOvswCg/08V11KALulG6u9j1affyHy20UMD
 /A1MRT3YZt6NJE9XbcalVLQzWc+ArCkW0oxNs/wrQ26lYoWuj20nusq9MDkuOL1h1FxeUrgx
 kKP+1zyYaQkB2lbJyvGvIpXgxY4vUnOXwMovTcRST3bWOOSIiYVOzKWJh5fPtoEaU5wFZ6yU
 lu/QGoS8Lt9QOI/XjjRaJjf0T6rKBADTn4xcxNIQNWSxJthmH3ipn39+sizwkZHfmAVHUf6w
 f4cDJ8mA3jl0RWKTnxj+5zEY32VduewHtNUtgwugXaIlLM/ErO+tzxQ4R6QysucgxmJBUvw8
 uDgUAKv8HQFviEGeUpQSoZLKoqxk3udT+9UEDHdUFZzUw6cb7nBL5RR05s0gSmFtZXMgSC4g
 R2Fycmlzb24gPGpoZ0BqaG1nLm5ldD7CZgQTEQIAJgIbIwIeAQIXgBYhBE0k6YNkgIecKmav
 NClu/GJwc42IBQJa/b1KAAoJEClu/GJwc42I7XIAniCLaMTp2qpwYcWGKiRES8CL4xmOAKDk
 pqXJ1LA3JyWt30h9ARgRRiNOCM7BTQQ1hFqHEAgA9kJXtwh/CBdyorrWqULzBej5UxE5T7bx
 brlLOCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/cdlJPPT2N286Z
 4VeSWc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaClcjrUGvC/RgBYK+X0iP1Y
 TknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD8KVbGI2Ou1WMuF040zT9fBdXQ6Md
 GGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZyAcpesqVDNmWn6vQClCbAkbTCD1mpF1Bn5x8
 vYlLIhkmuquiXsNV6TILOwACAgf/T9Es2C7dcY05hRsH/rhGC+spnzHnhlUDJed75t/JMQM2
 KQDxLpP+qSUB80JHgGCOea4YKqJmWnBrU1uKdCc19qy87p5bc6QxoqpKrt2SxayqSpGnWQlj
 eqlVIRPC2jm2QbqaWTZtQpyDwfkTbnGBnkp+tJomtPBATviM5S5jiQZKKTDBN70807J75hAn
 IRKD6L+QPbVzFt0yaS0LUsolzBrPE2pR228uNFjj7z5Mgq1la2AhKFM/MIM9i+Wc5j3MEEFU
 386cRSG+RyDQLKch6j+SgbX62BdOQxAF4EWRKIfU9xw7czC8AIMRTdAc1VyMIGE7asD7EwU6
 iRzcEGdAU8JGBBgRAgAGBQI1hFqHAAoJEClu/GJwc42ItM4AoL+kbkqNvMdUwSGxECYAMAFe
 gz3TAJ4wt2K8xQhx5iPuLTZFPyZoC8vrdw==
In-Reply-To: <c874178f-dc16-4725-94e5-5a92f98e424e@SystematicSW.ab.ca>
X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, BODY_8BITS,
 DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS,
 TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Jim Garrison via Cygwin <cygwin@cygwin.com>
Reply-To: jhg@acm.org
Cc: Jim Garrison <jhg@jhmg.net>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 41FHvkSe008325

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


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

