From owner-freebsd-bugs Fri Jul 5 1:20:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D33637B400 for ; Fri, 5 Jul 2002 01:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CFFE43E42 for ; Fri, 5 Jul 2002 01:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g658K2JU062558 for ; Fri, 5 Jul 2002 01:20:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g658K2UP062557; Fri, 5 Jul 2002 01:20:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5997B37B400 for ; Fri, 5 Jul 2002 01:16:14 -0700 (PDT) Received: from mailgw1.roland.co.jp (mailgw1.roland.co.jp [133.111.200.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2CBE43E09 for ; Fri, 5 Jul 2002 01:16:12 -0700 (PDT) (envelope-from kageyama@roland.co.jp) Received: from ryulina1.roland.co.jp (scangw1.roland.co.jp [133.111.200.5]) by mailgw1.roland.co.jp (8.9.3+Sun/3.7W) with ESMTP id RAA16601 for ; Fri, 5 Jul 2002 17:16:10 +0900 (JST) Received: from mykserv.roland.co.jp (mykserv [133.111.129.139]) by ryulina1.roland.co.jp (8.9.3/3.7W) with SMTP id RAA24303 for ; Fri, 5 Jul 2002 17:16:10 +0900 Received: from rdspa104.roland.co.jp ([133.111.130.134]) by mykserv.roland.co.jp (4.1/3.3W8-01121019) id AA08186; Fri, 5 Jul 2002 17:16:09 JST Received: by rdspa104.roland.co.jp (4.1/3.3W8-98051510) id AA01663; Fri, 5 Jul 2002 17:16:09 JST Message-Id: <020705171608.M0101655@rdspa104.roland.co.jp> Date: Fri, 5 Jul 2002 17:16:08 +0900 From: kageyama@roland.co.jp (Morihiro Kageyama) Reply-To: kageyama To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/40215: NIS host search not terminate Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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