Bug 30496

Summary: `host` does not work properly with top-level domains
Product: Base System Reporter: Tony Finch <dot>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Tony Finch 2001-09-11 00:50:01 UTC
`host` fails to make queries for top-level domains properly, because it
adds a superfluous dot to the end of the domain name when constructing
the query.

How-To-Repeat: 
fanf@hand.dotat.at:/FreeBSD/releng4/contrib/bind/bin/host
:; cat /etc/resolv.conf
search lab.dotat.at. dotat.at. .
nameserver 127.0.0.1
fanf@hand.dotat.at:~
:; /usr/obj/FreeBSD/releng4/usr.bin/host/host -d -v -t soa uk
Trying domain "lab.dotat.at."
;; res_nmkquery(QUERY, uk.lab.dotat.at., IN, SOA)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31536
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;      uk.lab.dotat.at, type = SOA, class = IN
;; Querying server (# 1) address = 127.0.0.1
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 31536
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;;      uk.lab.dotat.at, type = SOA, class = IN
lab.dotat.at.           1H IN SOA       hand.dotat.at. dot.dotat.at. (
                                        999950951       ; serial
                                        1D              ; refresh
                                        5M              ; retry
                                        1W              ; expiry
                                        1H )            ; minimum
rcode = 3 (Non-existent domain), ancount=0
Trying domain "dotat.at."
;; res_nmkquery(QUERY, uk.dotat.at., IN, SOA)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31537
;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;;      uk.dotat.at, type = SOA, class = IN
;; Querying server (# 1) address = 127.0.0.1
;; new DG socket
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 31537
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;;      uk.dotat.at, type = SOA, class = IN
dotat.at.               1H IN SOA       chiark.greenend.org.uk. dot.dotat.at. (
                                        999303549       ; serial
                                        1D              ; refresh
                                        5M              ; retry
                                        1W              ; expiry
                                        1H )            ; minimum
rcode = 3 (Non-existent domain), ancount=0
Trying domain "."
;; res_nmkquery(QUERY, uk.., IN, SOA)
res_nmkquery failed
No recovery, Host not found.
fanf@hand.dotat.at:~
:;
Comment 1 Kris Kennaway 2001-09-11 06:50:48 UTC
> `host` fails to make queries for top-level domains properly, because it
> adds a superfluous dot to the end of the domain name when constructing
> the query.

Isn't this a bug native to the vendor release?  If so, it should be
taken up with them.

Kris
Comment 2 Tony Finch freebsd_committer freebsd_triage 2002-05-15 00:07:42 UTC
State Changed
From-To: open->closed

Fixed by bind-8.3.1.