Date: Wed, 27 May 2009 03:46:42 +0900 From: Hajimu UMEMOTO <ume@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> Cc: freebsd-current@FreeBSD.org, Nicolas Blais <nicblais@clkroot.net> Subject: Re: dig -6 causes bind9 error Message-ID: <ygeeiubhfcd.wl%ume@mahoroba.org> In-Reply-To: <4A1C32D8.5010202@FreeBSD.org> References: <7061d9f50905261034l39077a73j1cb0bf7b59b54723@mail.gmail.com> <4A1C32D8.5010202@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
>>>>> On Tue, 26 May 2009 11:20:08 -0700
>>>>> Doug Barton <dougb@FreeBSD.org> said:
dougb> Given that you appear to only have an IPv4 server in your
dougb> /etc/resolv.conf file, why would you expect that to work? The -4 and
dougb> -6 flags are only relevant when you are using a name server hostname
dougb> that has both A and AAAA records.
I don't think that `dig -6' should work without an IPv6 server in
resolv.conf.
dougb> That said, I agree that the error message is less than graceful,
dougb> although dig is apparently trying to be helpful in converting what
dougb> you've given it into the best IPv6 format it can think of to try and
dougb> do what you told it to do.
It seems to me that dig(8) tries to use an IPv4-mapped IPv6 address
when only IPv4 server is listed in resolv.conf.
I confirmed that allowing use of an IPv4-mapped IPv6 address makes
dig(8) work against an IPv4 server, with the following patch:
Index: contrib/bind9/lib/isc/unix/socket.c
diff -u -p contrib/bind9/lib/isc/unix/socket.c.orig contrib/bind9/lib/isc/unix/socket.c
--- contrib/bind9/lib/isc/unix/socket.c.orig 2009-01-10 12:00:21.000000000 +0900
+++ contrib/bind9/lib/isc/unix/socket.c 2009-05-27 03:28:13.634476856 +0900
@@ -2108,6 +2108,8 @@ opensocket(isc_socketmgr_t *manager, isc
}
#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
+ isc_socket_ipv6only(sock, 0);
+
return (ISC_R_SUCCESS);
}
But, I'm skeptical about allowing use of an IPv4-mapped IPv6 address,
here. I'm not sure why libisc tries to use an IPv4-mapped IPv6
address in this case.
Sincerely,
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeeiubhfcd.wl%ume>
