Bug 40215 - [nis] NIS host search not terminate
Summary: [nis] NIS host search not terminate
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.6-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcelo Araujo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-05 09:20 UTC by Morihiro Kageyama
Modified: 2016-01-29 03:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Morihiro Kageyama 2002-07-05 09:20:01 UTC
  %ping aa.
  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.
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
Comment 1 Jens Schweikhardt freebsd_committer freebsd_triage 2002-09-20 18:29:01 UTC
Responsible Changed
From-To: freebsd-bugs->wpaul

Bill, can you have a look at this? It's in your code. Thanks!
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-07-31 08:32:01 UTC
Responsible Changed
From-To: wpaul->freebsd-bugs

Reassign from inactive committer. 

Hat:		bugmeister
Comment 3 Marcelo Araujo freebsd_committer freebsd_triage 2016-01-29 03:32:38 UTC
I'm unable to reproduce this issue.