From owner-freebsd-stable@FreeBSD.ORG Sun Nov 9 11:00:33 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A3841065670 for ; Sun, 9 Nov 2008 11:00:33 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id AC5128FC08 for ; Sun, 9 Nov 2008 11:00:32 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id mA9B0Gmk007793; Sun, 9 Nov 2008 11:00:26 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk mA9B0Gmk007793 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1226228427; bh=rvyiVh4+hNyvQe qEY8MhJDKEgAh1WqDbjiiiixxjYFQ=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<4916C2B8.6080702@infracaninophile.co.uk>|Date:=20Sun,=2 009=20Nov=202008=2011:00:08=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.17=20(X11/20080929)|MIME-Version:=201 .0|To:=20mdh_lists@yahoo.com|CC:=20freebsd-stable@freebsd.org|Subje ct:=20Re:=20host(1)=20problem=20with=20-6=20option|References:=20<9 4894.60594.qm@web56805.mail.re3.yahoo.com>|In-Reply-To:=20<94894.60 594.qm@web56805.mail.re3.yahoo.com>|X-Enigmail-Version:=200.95.6|Co ntent-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20 protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D"----- -------enig652B9874FDC5FDBAB40BEB7D"; b=F1tz4urRz8fDcvqYQInwfFkVSG4 PnQwuLqsE0QtL98M3OlvZmiCKYTb5kyHherhX9N48gLHqF2VuLlirTW30T6HGVG9cj6 Nu3k+nvwam8atD6atYcVJR+W4ezO/iLPUnOjCqYEo831Hdg/LbiQEhn8Qd+fvYsU7/S z3UNe4Z1eU= Message-ID: <4916C2B8.6080702@infracaninophile.co.uk> Date: Sun, 09 Nov 2008 11:00:08 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: mdh_lists@yahoo.com References: <94894.60594.qm@web56805.mail.re3.yahoo.com> In-Reply-To: <94894.60594.qm@web56805.mail.re3.yahoo.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig652B9874FDC5FDBAB40BEB7D" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Sun, 09 Nov 2008 11:00:27 +0000 (GMT) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-stable@freebsd.org Subject: Re: host(1) problem with -6 option X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 11:00:33 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig652B9874FDC5FDBAB40BEB7D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable mdh wrote: > Howdy folks, > I'm having a little trouble understanding a problem that the `host` > command in RELENG_7_0 (very recent) is having. This is by and large > my first time working with IPv6, which I've been meaning to learn for > some time. First off, I've got my zone file configured to return a > AAAA record for x1.mydomain and named isn't complaining. However, > when I run `host -6 x1.mydomain`, host returns the following output: > > (root@rapier) [/etc/namedb]: host -6 x1.mydomain > /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1179= : internal_send: ::ffff:127.0.0.1#53: Invalid argument > /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1179= : internal_send: ::ffff:IP.IP.IP.8#53: Invalid argument > /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1179= : internal_send: ::ffff:127.0.0.1#53: Invalid argument > /usr/src/lib/bind/isc/../../../contrib/bind9/lib/isc/unix/socket.c:1179= : internal_send: ::ffff:IP.IP.IP.8#53: Invalid argument > ;; connection timed out; no servers could be reached It's the way resolv.conf works. Consider this -- happy-idiot-talk:~:% cat /etc/resolv.conf=20 domain infracaninophile.co.uk nameserver ::1 nameserver 127.0.0.1 Which is all fine and dandy when told to use IPv6: happy-idiot-talk:~:% host -6 h-i-t.infracaninophile.co.uk h-i-t.infracaninophile.co.uk is an alias for happy-idiot-talk.infracanino= phile.co.uk. happy-idiot-talk.infracaninophile.co.uk has address 81.187.76.162 happy-idiot-talk.infracaninophile.co.uk has IPv6 address 2001:8b0:151:1:2= 40:5ff:fea5:8db7 happy-idiot-talk.infracaninophile.co.uk mail is handled by 10 smtp.infrac= aninophile.co.uk. but goes tits-up when told to use IPv4: happy-idiot-talk:~:% host -4 h-i-t.infracaninophile.co.uk host: couldn't get address for '::1': address family not supported nameserver entries in resolv.conf are tried in the order given. Using the -4 or -6 switches to host(1) forces it to try each of the listed nameserver addresses by the stated protocol. It makes no sense at all=20 to try and access an IPv6 address using IPv4 transport, and trying the=20 converse: an IPv4 address via IPv6, will either fail or try and use=20 IPv4-mapped addresses. You might think that the '-4' and '-6' flags to host(1) are pretty much useless in that case, but they work fine=20 when you also tell host(1) the domain name of a nameserver to use[*]: happy-idiot-talk:~:% host -4 h-i-t.infracaninophile.co.uk localhost=20 Using domain server: Name: localhost Address: 127.0.0.1#53 Aliases:=20 h-i-t.infracaninophile.co.uk is an alias for happy-idiot-talk.infracanino= phile.co.uk. happy-idiot-talk.infracaninophile.co.uk has address 81.187.76.162 happy-idiot-talk.infracaninophile.co.uk has IPv6 address 2001:8b0:151:1:2= 40:5ff:fea5:8db7 happy-idiot-talk.infracaninophile.co.uk mail is handled by 10 smtp.infrac= aninophile.co.uk. happy-idiot-talk:~:% host -6 h-i-t.infracaninophile.co.uk localhost Using domain server: Name: localhost Address: ::1#53 Aliases:=20 h-i-t.infracaninophile.co.uk is an alias for happy-idiot-talk.infracanino= phile.co.uk. happy-idiot-talk.infracaninophile.co.uk has address 81.187.76.162 happy-idiot-talk.infracaninophile.co.uk has IPv6 address 2001:8b0:151:1:2= 40:5ff:fea5:8db7 happy-idiot-talk.infracaninophile.co.uk mail is handled by 10 smtp.infrac= aninophile.co.uk. Arguably it is a bug for host(1) to give up on the first entry in /etc/resolv.conf when told to use a conflicting address type.=20 However, that should be reported to ISC rather than the FreeBSD=20 project. When allowed to determine the transport type automatically everything works as expected. Cheers, Matthew [*] but only if the domain name of the nameserver you want to query can be resolved by means that don't fall foul of the same IPv4 vs IPv6 problem. Which boils down to using other than the DNS -- eg.=20 /etc/hosts -- to find the nameserver address. --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig652B9874FDC5FDBAB40BEB7D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkWwsAACgkQ8Mjk52CukIwQzwCgj9bhTywi8h6xyRkfOxtfxrAh JAIAn3Eo1Ccp+lmigvJgxi8+UJpHDlfA =be5o -----END PGP SIGNATURE----- --------------enig652B9874FDC5FDBAB40BEB7D--