Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jul 1997 06:32:07 +0200 (CEST)
From:      Andre Albsmeier <Andre.Albsmeier@mchp.siemens.de>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/4147: libc changes make ypserv unimpossible to resolve hostname
Message-ID:  <199707230432.GAA24951@curry.mchp.siemens.de>
Resent-Message-ID: <199707230440.VAA23688@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         4147
>Category:       bin
>Synopsis:       libc changes make ypserv unimpossible to resolve hostname
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 22 21:40:01 PDT 1997
>Last-Modified:
>Originator:     Andre Albsmeier
>Organization:
>Release:        FreeBSD 2.2-STABLE i386
>Environment:

	2.2-STABLE

>Description:

Hi,

when running "ypserv -n" on 2.2-STABLE it is no longer possible for ypserv
to resolve hostnames which are not fully qualified. This is due to a change in
lib/libc/net/gethostbydns.c which now returns as h_errno NO_RECOVERY instead
of TRY_AGAIN. I have implemented an additional debugline which shows this effect
in usr.sbin/ypserv/yp_dnslookup.c.

I don't know where it should be changed; in gethostbydns.c or in yp_dnslookup.c...

Thanks

	-Andre

---------------------------------------------------------------------------------

running "ypserv -d -n" using NEW lib/libc/net/gethostbydns.c and querying
for host "pcauth" on PC-NFS client:

root@server:/usr/src/usr.sbin/ypserv>./ypserv -d -n
;; res_setoptions("debug", "env")..
;;      debug
ypserv: Procedure ypproc_domain called from 192.168.21.143:1500
ypserv: Procedure ypproc_match called from 192.168.21.143:1500
ypserv: Client is referencing map "hosts.byname".
ypserv: Looking up key [pcauth]
ypserv: Doing DNS lookup of pcauth
;; res_mkquery(0, pcauth, 1, 1)
ypserv: Queueing async DNS name lookup (399)
ypserv: Running dns queue
ypserv: Got dns reply from 192.168.16.33
ypserv: ypserv h_errno = 3
                         |
This is NO_RECOVERY------+

ypserv: Sending dns reply to 192.168.21.143 (399)
ypserv: Running dns queue
ypserv: Running dns queue


---------------------------------------------------------------------------------

running "ypserv -d -n" using OLD lib/libc/net/gethostbydns.c and querying
for host "pcauth" on PC-NFS client:

root@server:/usr/src/usr.sbin/ypserv>./ypserv -d -n
;; res_setoptions("debug", "env")..
;;      debug
ypserv: Procedure ypproc_domain called from 192.168.21.143:1500
ypserv: Procedure ypproc_match called from 192.168.21.143:1500
ypserv: Client is referencing map "hosts.byname".
ypserv: Looking up key [pcauth]
ypserv: Doing DNS lookup of pcauth
;; res_mkquery(0, pcauth, 1, 1)
ypserv: Queueing async DNS name lookup (45885)
ypserv: Running dns queue
ypserv: Got dns reply from 192.168.16.33
ypserv: ypserv h_errno = 2
                         |
This is TRY_AGAIN -------+

ypserv: Retrying with: pcauth.us.tld
;; res_mkquery(0, pcauth.us.tld, 1, 1)
ypserv: Running dns queue
ypserv: Running dns queue
ypserv: Got dns reply from 192.168.16.33
ypserv: Sending dns reply to 192.168.21.143 (45886)
ypserv: Running dns queue
ypserv: Running dns queue
ypserv: Running dns queue
ypserv: Procedure ypproc_match called from 192.168.21.143:1500
ypserv: Client is referencing map "hosts.byname".
ypserv: Looking up key [printfix.us.tld]
ypserv: Doing DNS lookup of printfix.us.tld
;; res_mkquery(0, printfix.us.tld, 1, 1)
ypserv: Queueing async DNS name lookup (45887)
ypserv: Running dns queue
ypserv: Got dns reply from 192.168.16.33
ypserv: Sending dns reply to 192.168.21.143 (45887)
g

>How-To-Repeat:

run ypserv -n and query an unqualified hostname from a PC-NFS client.

>Fix:
	

I simply have removed "h_errno == TRY_AGAIN" in usr.sbin/ypserv/yp_dnslookup.c so 
it works again.

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707230432.GAA24951>