Bug 29388

Summary: DNS resolver problem (gethostbyaddr)
Product: Base System Reporter: Alexander S. Usov <usov>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Alexander S. Usov 2001-08-02 15:10:24 UTC
When I perform dns lookup with gethostbyaddr(3), and destination machine
has an underscore (_) in its name, I get an NO_RECOVERY error code.
When I use dig(1) or nslookup(1) I get a correct answer.

Note:
As a DNS server/cache I use djbdns-1.05.
Comment 1 dima 2001-08-02 16:09:09 UTC
"Alexander S. Usov" <usov@ukr.net> writes:
> >Description:
> When I perform dns lookup with gethostbyaddr(3), and destination machine
> has an underscore (_) in its name, I get an NO_RECOVERY error code.
> When I use dig(1) or nslookup(1) I get a correct answer.

No, gethostbyaddr() give the correct response because an underscore
isn't a valid character in a hostname.  dig and nslookup are
maintained by ISC; please talk to them about fixing their programs, or
at least making the non-compliant behavior optional (e.g., with a
command line flag).
Comment 2 dwmalone 2001-08-02 16:43:14 UTC
On Thu, Aug 02, 2001 at 07:08:45AM -0700, Alexander S. Usov wrote:
> >Description:
> When I perform dns lookup with gethostbyaddr(3), and destination machine
> has an underscore (_) in its name, I get an NO_RECOVERY error code.
> When I use dig(1) or nslookup(1) I get a correct answer.

An _ in a hostname is not legal. Resolver libraries and name servers
are beginning to be more strict and refuse to resolve such names.
I suspect this is what you are seeing.

	David.
Comment 3 Jim.Pirzyk 2001-08-02 17:22:39 UTC
DNS does not allow '_' (underscores) in host names.  This is per
one of the DNS RFC's (but of course I cannot find the number right
now).

- JimP

On Thursday 02 August 2001 07:08 am, Alexander S. Usov wrote:
> >Number:         29388
> >Category:       misc
> >Synopsis:       DNS resolver problem (gethostbyaddr)
> >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:   Thu Aug 02 07:10:24 PDT 2001
> >Closed-Date:
> >Last-Modified:
> >Originator:     Alexander S. Usov
> >Release:        4-STABLE
> >Organization:
> >Environment:
>
> FreeBSD darkini.itv 4.3-STABLE FreeBSD 4.3-STABLE #1: Wed Aug  1 13:48:00
> EEST 2001     root@darkini.itv:/usr/src/sys/compile/DARKINI i386
>
> >Description:
>
> When I perform dns lookup with gethostbyaddr(3), and destination machine
> has an underscore (_) in its name, I get an NO_RECOVERY error code.
> When I use dig(1) or nslookup(1) I get a correct answer.
>
> Note:
> As a DNS server/cache I use djbdns-1.05.
>
> >How-To-Repeat:
> >
> >Fix:
> >
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-bugs" in the body of the message

-- 
--- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $
    __o   Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org
 _'\<,_   Senior Systems Engineer, Walt Disney Feature Animation 
(*)/ (*)
Comment 4 bill fumerola freebsd_committer freebsd_triage 2001-08-03 00:08:59 UTC
State Changed
From-To: open->closed

'_' isn't a valid character in hostnames