#1101995 wget: does not fall back ti ipv4 if ipv6 does not work

Package:
wget
Source:
wget
Description:
retrieves files from the web
Submitter:
Francesco Potortì
Date:
2025-04-03 18:27:02 UTC
Severity:
normal
#1101995#5
Date:
2025-04-03 18:25:59 UTC
From:
To:
If a target has both an ipv6 and an ipv4 address, Wget uses ipv6 as usual.  But if ipv6 connectivity is broken, Wget does not fall back to ipv4, while it should.  Following is an example situation that I can observe here

$ host aduc.it
aduc.it has address 172.67.186.21
aduc.it has address 104.21.84.40
aduc.it has IPv6 address 2606:4700:3033::6815:5428
aduc.it has IPv6 address 2606:4700:3030::ac43:ba15
aduc.it mail is handled by 10 mail.aduc.it.
aduc.it has HTTP service bindings 1 . alpn="h3,h2" ipv4hint=188.114.96.7,188.114.97.7 ech=AEX+DQBB+gAgACB68yWanQwvuuMkhtkJKB5NiMnIVzllHE/OmbkjIS42JQAEAAEAAQASY2xvdWRmbGFyZS1lY2guY29tAAA= ipv6hint=2a06:98c1:3120::7,2a06:98c1:3121::7

~/doc$ wget aduc.it
Prepended http:// to 'aduc.it'
--2025-04-03 14:43:51--  http://aduc.it/
Resolving aduc.it (aduc.it)... 2606:4700:3033::6815:5428, 2606:4700:3030::ac43:ba15, 104.21.84.40, ...
Connecting to aduc.it (aduc.it)|2606:4700:3033::6815:5428|:80...   C-c C-c

$ traceroute 2606:4700:3033::6815:5428
traceroute to 2606:4700:3033::6815:5428 (2606:4700:3033::6815:5428), 30 hops max, 80 byte packets
 1  2a00:1620:c0:50:fe:: (2a00:1620:c0:50:fe::)  11.378 ms  11.358 ms  11.394 ms
 2  2a00:1620:c0:ffff::9230:7f45 (2a00:1620:c0:ffff::9230:7f45)  0.417 ms  0.451 ms  0.493 ms
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  *  C-c C-c