MingW version compiled with ENABLE_IPV6, HAVE_GETADDRINFO etc.
but no HAVE_GETADDRINFO_AI_ADDRCONFIG.

Running "wget -6 url.." on a machine with no IPv6 installed silently
uses IPv4. A warning with fallback to IPv4 is IMHO okay. Or an exit?

Not sure about the rationale behind '--inet6-only', but the problem seems 
to be in defaults(); when socket() fails, 'opt.ipv4_only=1' is forced before 
the cmd-line is parsed. So lookup_host() uses AF_UNSPEC in the hints.

My suggestion is to move the "socket(AF_INET?)" test to host.c and
call it once from lookup_host(). Take action (exit?) if 'opt.ipv?_only' 
doesn't match returned 'res.ai_family'.

Similarily, on a machine with only IPv6 (it they really exist?),
'--inet4-only' should also fail or give a warning.

Gisle V.

# rm /bin/laden 
/bin/laden: Not found 

Reply via email to