On Wed, 10 Sep 2003, Hrvoje Niksic wrote:

> Mauro Tortonesi <[EMAIL PROTECTED]> writes:
>
> >> Shouldn't we simply check for libinet6 in the usual fashion?
> >
> > this could be another solution. but i think it would be much better
> > to do it only for kame and usagi stack.
>
> Hmm.  Checking for "stacks" by names is not the Autoconf way.  Isn't
> it better to test for needed features?  Daniel's test was written in
> that spirit.

i think kame or usagi stack detection is not so ugly and works better than
the simple detection of libinet6. in fact, if you don't want to perform
stack detection, you have to test if libinet6 is installed on the host
system __and__ if the getaddrinfo function contained in libinet6 is
better that the one shipped with the libc. it is a cleaner (and better)
approach, but much more complicated and error prone than stack detection,
IMVHO.

what do you think about it?


> >> Furthermore, I don't think that Wget uses any of those flags.  Why are
> >> should an application that doesn't use them care?  Note that I ask
> >> this not to annoy you but to learn; you obviously know much more about
> >> IPv6 than I do.
> >
> > well, it is very important using AI_ADDRCONFIG with getaddrinfo. in this
> > way you get resolution of AAAA records only if you have ipv6 working on
> > your host (and, less important, resolution of A records only if you
> > have ipv4 working on your host). dns resolution in a mixed ipv4 and ipv6
> > environment is a nightmare and AI_ADDRCONFIG can save you a lot of
> > headaches.
>
> Very interesting.  So what you're saying is that programs that simply
> follow the getaddrinfo man page (including IPv6-enabled Wget in
> Debian) don't work in mixed environments?  That's really strange.

no, i'm not saying that. i'm saying that if you have a program that calls
getaddrinfo on an ipv6(4)-only host you get also A(AAAA) records with
ipv4(6) addresses that you cannot connect to. this may slow down the
connection process (if the code is well written), or simply break it
(if the code is badly written) and may also cause other subtle problems.

by using the AI_ADDRCONFIG flag with getaddrinfo on a ipv6(4)-only host
you get only AAAA(A) records. however, i think that a "use ipvX only"
configuration option is a better solution than AI_ADDRCONFIG.


-- 
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