Subject: Re: release and A instead of AAAA?

Re: release and A instead of AAAA?

From: William Ahern <william_at_25thandclement.com>
Date: Mon, 13 Dec 2010 18:20:46 -0800

On Mon, Dec 13, 2010 at 01:41:39PM +0100, Steinar H. Gunderson wrote:
> On Wed, Dec 08, 2010 at 04:21:24PM -0800, William Ahern wrote:
> >> This would be ???OpenBSD just wants to be difficult???. :-)
> > You get the same behavior on KAME stacks when net.inet6.ip6.v6only is 1,
> > which is the default value on NetBSD and, I think, FreeBSD.
>
> That's just a default; there's an ioctl to put it back to supporting
> dual-stack sockets.

Sure. But the point was the behavior causing confusion for people who didn't
expect the resolver to return an A address as a mapped address. There are
legitimate reasons Google and others don't yet publish AAAA addresses for
google.com. Mostly because of broken software, admittedly. Yet an interface
which purports to act like gethostbyname/gethostbyname2 but which acts
differently just adds more confusion and uncertainty to the mix.

> > There's a difference between doing the Right Thing with default settings and
> > shoe-horning policy into an interface lacking the ability to select the
> > setting or to even know that a response has been manufactured.
>
> Sure, but this interface has been set a long time ago.

I didn't realize it had been in the tree so long.

> Regardless of what you may think or not about the usefulness of mapped-v4
> sockets, c-ares should not unilaterally decide that its gethostbyname()
> should suddenly behave differently from everybody else wrt. AAAA
> fallbacks.

Just so we're clear, though, by everybody else we mean c-ares users, right?
Because AFAICT other gethostbyname2 implementations don't play games like
that (I just tested on OS X, OpenBSD, and Linux).
 
> You're of course free to make some sort of interface, or flag, that specifies
> no fallback. I'm sure it has its own use (for instance in implementing
> parallel A/AAAA lookup yourself).

I was more concerned with having to support other people's software, or
having to build in the same policy to my own DNS library. But as its
apparently been in c-ares long enough that many people are depending on it
then it's moot.
Received on 2010-12-14