On Tue, 28 Oct 2003, Tony Hain wrote: [...] > > So, I'll conclude by a few questions to give food for thought: > > > > - does this seem like a problem, that is, should getaddrinfo() + > > AI_ADDRCONFIG perform AAAA DNS queries etc. if > > the node only has v6 link-local/loopback addresses? > > It is not a problem if you follow addr selection rules and prefer > matching scopes. This will cause IPv4 to be used if there is only a LL, > trying to talk to a AAAA global.
Uhh, I don't think Default Address Selection helps at all here. The question is NOT how you prefer the addresses after you've queried them, it's whether you query them *at all*. I.e., the point of the AI_ADDRCONFIG as it seems to me is to avoid an unnecessary query of IPv6 addresses in the first place. For example, the app wants to look up www.example.com. Prior to making that lookup, it must know which addresses are configured on the node if AI_ADDRCONFIG is used. It doesn't know about scopes of www.example.com at this point. If there are no IPv6 addresses (including link-locals) configured, it'll query only A records and then perform default address selection as you say, naturally ending up with IPv4 as there are no alternatives. If there are IPv6 addresses (including link-locals), it'll query both A and AAAA records and perform default address selection, probably also resulting in IPv4 if no global IPv6 addresses were configured. -- Pekka Savola "You each name yourselves king, yet the Netcore Oy kingdom bleeds." Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings -------------------------------------------------------------------- IETF IPv6 working group mailing list [EMAIL PROTECTED] Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6 --------------------------------------------------------------------
