Subject: lib/18072: getaddrinfo(3) doesn't work with late BIND 9.
To: None <gnats-bugs@gnats.netbsd.org>
From: Lars-Johan Liman <liman@autonomica.se>
List: netbsd-bugs
Date: 08/26/2002 09:22:17
>Number: 18072
>Category: lib
>Synopsis: getaddrinfo(3) doesn't work with late BIND 9.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 26 00:22:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Lars-Johan Liman
>Release: NetBSD 1.5ZA (and later)
>Organization:
#----------------------------------------------------------------------
# Lars-Johan Liman ! E-mail: liman@autonomica.se
# Senior Systems Specialist ! HTTP : //www.autonomica.se/
# Autonomica AB, Stockholm ! Voice : +46 8 - 615 85 72
#----------------------------------------------------------------------
>Environment:
System: NetBSD naptop.autonomica.net 1.5ZA NetBSD 1.5ZA (NAPTOP) #0: Tue May 14 23:13:12 MEST 2002 liman@naptop.autonomica.net:/mnt/src/sys/arch/i386/compile/NAPTOP i386
Architecture: i386
Machine: i386
>Description:
It seems like the "@servername" argument doesn't work with "dig". It
only reports
tcsh> dig @nic.cafax.se version.bind txt chaos
dig: couldn't get address for 'nic.cafax.se': failure
Using an IP addrses works just fine:
tcsh> dig @192.71.228.17 version.bind txt chaos
; <<>> DiG 9.3.0s20020618 <<>> @192.71.228.17 version.bind txt chaos
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59211
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;version.bind. CH TXT
;; ANSWER SECTION:
version.bind. 0 CH TXT "9.2.0"
;; Query time: 35 msec
;; SERVER: 192.71.228.17#53(192.71.228.17)
;; WHEN: Wed Jun 26 11:13:34 2002
;; MSG SIZE rcvd: 48
My resolv.conf contains only:
tcsh> cat /etc/resolv.conf
nameserver 127.0.0.1
tcsh>
and the named there works OK:
tcsh> dig nic.cafax.se A
; <<>> DiG 9.3.0s20020618 <<>> nic.cafax.se A
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2012
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;nic.cafax.se. IN A
;; ANSWER SECTION:
nic.cafax.se. 600 IN A 192.71.228.17
;; AUTHORITY SECTION:
cafax.se. 600 IN NS kista.dns.swip.net.
cafax.se. 600 IN NS ns.cafax.se.
;; ADDITIONAL SECTION:
ns.cafax.se. 600 IN A 192.71.228.17
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jun 26 11:17:01 2002
;; MSG SIZE rcvd: 111
When reported to bind9-bugs, Mark Andrews replied as follows:
Date: Tue, 2 Jul 2002 21:36:04 -0700 (PDT)
To: liman@autonomica.se
From: Request Tracker <bind9-bugs@isc.org>
dig uses the system's getaddrinfo() to covert @server to a address.
Mark
which puts it in "your" lap. ;-)
Is there any chance that this can be fixed. I and my collegue are
working on a Secure DNS project where we use "dig" very frequently,
and really need the latest hacks in the code, and not being able to
use host names is a big nuisance.
>How-To-Repeat:
Compile late snapshot of BIND9 (e.g.,
ftp://ftp.isc.org/isc/bind9/snapshots/bind-9.3.0s20020722.tar.gz )
with "--with-openssl" (probably doesn't matter). Try the
".../bin/dig/dig" binary.
>Fix:
Probably some bug in getaddrinfo(3) or thereabout.
>Release-Note:
>Audit-Trail:
>Unformatted: