Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jan 2002 00:41:15 -0200 (BRST)
From:      Frederico A C Neves <fneves@registro.br>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        fneves@registro.br
Subject:   bin/34291: whois client making recursive query on the same server 2 times
Message-ID:  <20020126024115.CE1D98C24@fork.foo.eng.br>

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

>Number:         34291
>Category:       bin
>Synopsis:       whois client making recursive query on the same server 2 times
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 25 18:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frederico A C Neves
>Release:        FreeBSD 4.5-RC i386
>Organization:
Registro.br
>Environment:
System: FreeBSD fork.foo.eng.br 4.5-RC FreeBSD 4.5-RC #0: Sun Jan 13 20:49:59 BRST 2002 root@fork.foo.eng.br:/usr/src/sys/compile/FORKH i386


	
>Description:

When the whois client receives a first answer of a query on the .BR whois 
server it detects the string "whois.registro.br" on the answer and make a
second recursive query on the same server. This feature was introduced to
follow a referral from the ARIN whois server and works for IPs but it will
make the same query 2 times for .BR domain names when the server is not
specified on the command line. The following patch prevents the client
from recur on the same server   

	
>How-To-Repeat:

Using this version of the whois client

 "$FreeBSD: src/usr.bin/whois/whois.c,v 1.15.2.7 2001/12/09 07:20:39
  mike Exp $";

try:

$ whois registro.br

	
>Fix:

*** whois.c_orig        Thu Jan 24 20:40:52 2002
--- whois.c     Thu Jan 24 20:34:00 2002
***************
*** 299,305 ****
                }
        }
        if (nhost != NULL) {
!               if ((res2 = gethostinfo(nhost, 0)) == NULL) {
                        free(nhost);
                        return;
                }
--- 299,307 ----
                }
        }
        if (nhost != NULL) {
!               if ((res2 = gethostinfo(nhost, 0)) == NULL ||
!                   (((struct sockaddr_in *)res->ai_addr)->sin_addr.s_addr ==
!                    ((struct sockaddr_in *)res2->ai_addr)->sin_addr.s_addr)) {
                        free(nhost);
                        return;
                }

	
>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?20020126024115.CE1D98C24>