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)? 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. >> >> 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. Then it sounds like definitely want to use this flag. 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? If the latter is the case, should be a "use ipvX only" runtime option as well?