On Wed, 12 Nov 2003, Hrvoje Niksic wrote:

> Mauro Tortonesi <[EMAIL PROTECTED]> writes:
>
> >> I suppose I can work around the problem by specifying `inet4_only=yes'
> >> in .wgetrc...
> >>
> >> Better yet, maybe we should make -4 the default on machines that don't
> >> support AI_ADDRCONFIG and on which creating an AF_INET6 socket fails?
> >
> > IMHO, no. we should simply try in order each sockaddr address
> > returned by getaddrinfo (if we don't, there can be problems in
> > system which support RFC3484) and print an error message only if the
> > verbosity option is turned on.
>
> Yes, but Wget is not nc -- the verbosity option is on by default.  :-)
>
> Also, the failed connect attempts potentially slow things down.  I
> don't want Wget to try to connect to random IPv6 addresses -- it will
> not work for me and it's just wrong.  Wget should be smarter about
> this.  Given the choice between suppressing error messages and doing
> the right thing in the first place, I'd always go for the latter.

perhaps we can perform a check like this in main: if AI_ADDRCONFIG is not
supported AND ipv6 is not supported (e.g. creation of PF_INET6 sockets
fails or we don't have a global ipv6 address configured on one of the
interfaces), then enable --inet4-only.


> Could you please explain how defaulting to --inet4-only on systems
> that cannot connect to IPv6 breaks systems that support rfc3484?  It's
> not obvious to me -- surely IPv6 addresses would fail to work on such
> systems anyway?

sorry, i misexplained myself. enabling --inet4-only by default on systems
that do not support AI_ADDRCONFIG but have ipv6 connectivity is just like
not having ipv6 support at all. i wouldn't recommend adopting this
behaviour.

the problem with rfc3484 may arise if we don't use the sockaddr addresses
returned by getaddrinfo in order, but this is another problem.


-- 
Aequam memento rebus in arduis servare mentem...

Mauro Tortonesi                 [EMAIL PROTECTED]
                                [EMAIL PROTECTED]
                                [EMAIL PROTECTED]
Deep Space 6 - IPv6 with Linux  http://www.deepspace6.net
Ferrara Linux User Group        http://www.ferrara.linux.it


Reply via email to