On Thu, 11 Sep 2003, Hrvoje Niksic wrote:

> Mauro Tortonesi <[EMAIL PROTECTED]> writes:
>
> > 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.
>
> Isn't the second check a matter of running a small test program, as in
> the check that Daniel provided (but more sophisticated)?

sure. but what was the problem with stack detection? it's simply a couple
of AC_EGREP_CPP macros after all...

i could start from:

http://cvs.deepspace6.net/view/nc6/config/in6_guess_stack.m4?rev=HEAD&content-type=text/vnd.viewcvs-markup

and made it much simpler (15-30 lines). what is your opinion about it?


> If we absolutely must detect "kame" and "usagi" (whatever those
> are:>), we'll do so.  But I'd like to be sure that other options
> have been researched.

the USAGI project: http://www.linux-ipv6.org
the KAME project: http://www.kame.net

for more info about USAGI and ipv6 on Linux, you may want to read this
article:

Obtaining the best IPv6 support with Linux

http://www.deepspace6.net/docs/best_ipv6_support.html


> > 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.
>
> Then it sounds like definitely want to use this flag.

yes.


> However, you go on to say:
>
> > 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.
>
> "Better solution" in the sense that we shouldn't use AI_ADDRCONFIG
> after all?  Or that this configuration option should be an alternative
> to AI_ADDRCONFIG?

"Better solution" in the sense that common implementations of the
AI_ADDRCONFIG flag to check if the system supports ipv6(4) is
simply try to create a PF_INET6(PF_INET) socket, which is not a very
good test after all because a host could support the ipv6 protocol but
not have ipv6 connectivity.

a better approach could be to tell the resolver to disable ipv6(4)
name resolution (an option that unfortunately nor the glibc nor libinet6
support) or tell the application itself not to perform ipv6(4) name
resolution. read below.


> If the latter is the case, should be a "use ipvX only" runtime option
> as well?

i think that -4 and -6 command line options for wget are a MUST. the first
would make wget use ipv4 only, while the second would make wget use
ipv6 only. believe me, there are plenty of cases in which you want to use
such options.


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