[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Revisiting AI_ADDRCONFIG

From: Hrvoje Niksic
Subject: Re: [Bug-wget] Revisiting AI_ADDRCONFIG
Date: Tue, 28 Sep 2010 13:01:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

"Ángel González" <address@hidden> writes:

> However, there's another easier thing to do for wget. Ulrich Drepper
> strongly argues there that getaddrinfo() callers should use the
> AI_ADDRCONFIG flag. wget is purposefully not using that flag [2] and
> so even if disabling ipv6 [3] it still performs the two queries (and
> produces the waiting behavior) whereas adding AI_ADDRCONFIG avoid it.

Note that you can disable IPv6 in Wget itself with --inet4-only or the
equivalent .wgetrc command.  That will cause Wget to request AF_INET
family from getaddrinfo and (presumably) avoid the spurious lookup that
causes problems.

AI_ADDRCONFIG does the equivalent of --inet4-only and --inet6-only
automatically, depending on which network interfaces are configured.
When we tried using it some years ago, it caused a number of bugs
because of the flag having been poorly implemented, both on Linux
(including my primary development machine) and on other operating
systems, such as Solaris and reportedly AIX.

Ulrich is pushing for uniformity in application space, which is a
reasonable position and one I have sympathy for.  But Wget is not a
Linux-only program, nor does it cater only to systems configured in a
specially prescribed way.  If we're certain that AI_ADDRCONFIG wouldn't
hurt anyone, we can add it, but given Wget's flexibility in requesting
and sorting addresses returned by DNS, I don't see a compelling reason
to do it right now.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]