[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getaddrinfo address ordering [Re: IPv6 transition architecturediscussion]



On Wed, 27 Nov 2002, Keith Moore wrote:
> > There are already some variables that affect this, namely:
> > 
> >  1) whether the DNS lookup produces A, AAAA, or both; ie "remote
> > site configuration"
> 
> I don't see how this affects ordering - if you don't get back A 
> records are you going to put the AAAA records in a different
> order relative to one another than if you do get them back?

Of course you're right -- the ordering described here is only relevant 
when both are used.

The point was that, because of current ordering, people don't really put 
v6 addresses in AAAA fields that much, so this is no problem (address 
resolves to either A or AAAA (under e.g. ipv6 subdomain)).

But we'd like it to be different..

> >  2) what ordering for DNS records is used when both are used
> > (default is AAAA first everywhere I know, no possibility to change that)
> > 
> >  3) whether the application uses AF_INET, AF_INET6 or AF_UNSPEC
> > (with server apps, this is even a bit muddier.)
> > 
> > These help quite a bit, but I guess adding some getaddrinfo hint like
> > AI_PREFERV4 or AI_PREFERV6 could be added in the case that DNS lookup
> > returns both addresses, you use AF_UNSPEC and you want to influence the
> > default DNS record ordering.
> 
> it's fairly easy for an app to reorder addresses that it gets back
> between IPv4 and IPv6.  but I often find myself wanting to specify
> a mixed preference like:
> 
> 6to4 addresses

.. particularly if you use 6to4 addresses yourself; otherwise you really 
don't buy much by separating them from other v6.

> native IPv4
> other IPv6

Yeah -- but that's something that we must not try to plug into every app 
-- it should really be done by lower layers (at least, by functions 
provided by lower layers).  No need to write the code 1000 times :-).

-- 
Pekka Savola                 "Tell me of difficulties surmounted,
Netcore Oy                   not those you stumble over and fall"
Systems. Networks. Security.  -- Robert Jordan: A Crown of Swords