Date: Fri, 5 Jul 2002 17:16:08 +0900 From: kageyama@roland.co.jp (Morihiro Kageyama) To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/40215: NIS host search not terminate Message-ID: <020705171608.M0101655@rdspa104.roland.co.jp>
next in thread | raw e-mail | index | archive | help
>Number: 40215 >Category: bin >Synopsis: NIS host search not terminate >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 05 01:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: kageyama >Release: FreeBSD 4.6-RELEASE i386 >Organization: roland DG corp. >Environment: FreeBSD r3.rdg.roland.co.jp 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Thu Jun 13 20:01:28 JST 2002 kageyama@roland.co.jp:/usr/obj/usr/src/sys/GENERIC i386 >Description: %ping aa. yp_match: clnt_call: RPC: Timed out >How-To-Repeat: /etc/host.conf : hosts bind nis /etc/rc.conf: nis_client_enable="YES" nisdomainname="test-dom" nis_server_enable="YES" nis_yppasswdd_enable="YES" nis_server_flags="" or nis_server_flags="-n" /var/yp/Makefile.dist B=-b # not comment out This is OK. %ping aa ping: cannot resolve aa: Unknown host Not terminate %ping aa. yp_match: clnt_call: RPC: Timed out yp_match: clnt_call: RPC: Timed out >Fix: NIS DNS first try, search hostname is "aa.". it's fail. NIS DNS second try, serach hostname is "aa..subdomain.domain". ^^ two dot include. This append is line 396 in /usr/src/usr.sbin/ypserv/yp_dnslookup.c if (hent == NULL) { if ((h_errno == TRY_AGAIN || h_errno == NO_RECOVERY) && q->domain && *q->domain) { domain append ---> snprintf(retrybuf, sizeof(retrybuf), "%s.%s", q->name, *q->domain); if (debug) yp_error("retrying with: %s", retrybuf); q->id = yp_send_dns_query(retrybuf, q->type); q->ttl = DEF_TTL; q->domain++; return; } then DNS hostname search call "res_mkquery()" is fail. and set h_error = NO_RECOVERY. therefore ypserv is host search looping, Not answer YP error. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?020705171608.M0101655>