bin/128727: host(1) does not work properly with the -6 option

Matt D. Harris mdh_lists at yahoo.com
Sun Nov 9 08:20:09 PST 2008


>Number:         128727
>Category:       bin
>Synopsis:       host(1) does not work properly with the -6 option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 09 16:20:08 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Matt D. Harris
>Release:        RELENG_7_0
>Organization:
>Environment:
FreeBSD rapier.mydomain 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Thu Nov  6 14:39:04 PST 2008     root at rapier.mydomain:/usr/src/sys/i386/compile/RAPIER  i386

>Description:
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 at 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

IP.IP.IP.8 is my ISP's DNS server, and is a third option just in case the localhost DNS server crashes or goes batty while I'm out drinking or somesuch.  Here's my resolv.conf, which shows ::1 listed as the second nameserver entry - however, it seems host -6 never even tries it. 

domain          mydomain
search          mydomain
nameserver      127.0.0.1
nameserver      ::1
nameserver      IP.IP.IP.8

The DNS server running on localhost is authoritative for mydomain.  I can ping it via localhost using both v4 and v6, and I can also ping the external v4 and v6 addresses just fine remotely.  

Worth noting is that host without the -6 option resolves the v6 addresses just fine, however it seems like it should work properly with the -6 option as well.  It is likely doing so via the IPv4 nameserver address, since that is the first nameserver specified in resolv.conf.  I had considered that perhaps IPv6 hosts needed a different type of specification in resolv.conf, however IPv6 is not mentioned at all in the resolv.conf(5) man page.  

Based on responses on the -questions mailing list, it seems that the -6 option should cause the host(1) command to only make queries via IPv6, and hence the ::1 line in resolv.conf should be the only one utilized.  

As I said, I'm new to IPv6, but this behavior seems to be counterintuitive.  Am I just doing it wrong?  

>How-To-Repeat:
Use the host(1) command with the -6 option to look up an IPv6 AAAA record or an ip6.arpa PTR record.  

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list