Date: Wed, 9 Jan 2013 16:29:00 +0000 From: Ben Morrow <ben@morrow.me.uk> To: ume@FreeBSD.org, freebsd-stable@freebsd.org Subject: Re: sendmail vs ipv6 broken after upgrade to 9.1 Message-ID: <20130109162900.GA81522@anubis.morrow.me.uk> In-Reply-To: <ygewqvme5r7.wl%ume@mahoroba.org> References: <20130108151837.GF35868@acme.spoerlein.net> <50EC5922.5030600@boland.org> <20130108184051.GI35868@acme.spoerlein.net> <20130109.073354.730245417155474512.hrs@allbsd.org> <yge1udufoa7.wl%ume@mahoroba.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoth Hajimu UMEMOTO <ume@FreeBSD.org>: > >>>>> On Wed, 09 Jan 2013 23:01:52 +0900 > >>>>> Hajimu UMEMOTO <ume@FreeBSD.org> said: > > ume> I changed getipnodebyname to obey ip6addrctl in years past. I read > ume> RFC 2553 again, and realize that it mentions IPv6 addresses are > ume> returned 1st. So, my past change might be bad thing. X-( Where does it say that? All I can find (but I might be being stupid) is the bit in the description of AI_ALL where it says 'A query is first made for AAAA records and if successful, the IPv6 addresses are returned. Another query is then made for A records and any found are returned as IPv4-mapped IPv6 addresses.'. I don't believe that is meant to indicate the AAAA results are returned first in the list, just that both sets of results are included. Also, RFC 6724 (which is more recent), says 'we intend that implementations of APIs such as getaddrinfo() will use the destination address selection algorithm specified here to sort the list of IPv6 and IPv4 addresses that they return.'. AFAICS 'APIs such as getaddrinfo()' is supposed to include getipnodebyname and gethostbyname2, and the whole list of v4 and v6 addresses is supposed to be sorted by those rules. However, given that FreeBSD disables the use of v4-mapped addresses on AF_INET6 sockets by default, it might be sensible to change the rules a little. An application making an AF_INET6 query is probably going to use the result with an AF_INET6 socket, so a v4-mapped address is going to be mostly useless. > I've just committed to disable it: > > http://svnweb.freebsd.org/base?view=revision&revision=245225 I don't think that's the right answer. Even if the code should be changed to always return addresses from A records last, the IPv6 addresses from AAAA records should still be sorted according to ip6addrctl. Otherwise sites with multiple prefixes (say, a ULA prefix and a global prefix) won't be able to control their use properly. Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130109162900.GA81522>