Subject: bin/1647: nslookup and resolver library use different search rules
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sommerfeld@orchard.medford.ma.us>
List: netbsd-bugs
Date: 10/18/1995 13:59:16
>Number:         1647
>Category:       bin
>Synopsis:       nslookup and resolver library use different search rules
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 10:35:01 1995
>Last-Modified:
>Originator:     Bill Sommerfeld
>Organization:
	
>Release:        mid-september current
>Environment:
	
System: NetBSD orchard.medford.ma.us 1.0A NetBSD 1.0A (ORCHARD) #5: Wed Oct 4 09:51:11 EDT 1995 sommerfeld@orchard.medford.ma.us:/u1/jsys/sys/arch/i386/compile/ORCHARD i386


>Description:
	This is almost certainly a generic problem with the version of
	bind we use, but I haven't verified that this exists on other
	systems, so I'm only reporting it here...

	nslookup and the resolver subsystem in libc use 
	different search rules for domain searching.
	This is surprising.

	In particular, nslookup doesn't know about the "ndots" option, and
	does searches for names with more than one non-terminal dot,
	while the resolver does know about ndots..

>How-To-Repeat:
	watch what DNS queries are done by 
		ping host.domain.foo
	vs
		nslookup host.domain.foo
	The latter will typically do a query for
		host.domain.foo.domain.foo

>Fix:
	rewrite nslookup to use res_search instead of having its own
	DNS searching code?
>Audit-Trail:
>Unformatted: