Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 2008 15:53:06 GMT
From:      "Matt D. Harris" <mdh_lists@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/128725: whois(1) does not correctly send queries regarding IPv6 addresses to the RIR whois servers
Message-ID:  <200811091553.mA9Fr6Tu011815@www.freebsd.org>
Resent-Message-ID: <200811091600.mA9G0AcJ034769@freefall.freebsd.org>

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

>Number:         128725
>Category:       bin
>Synopsis:       whois(1) does not correctly send queries regarding IPv6 addresses to the RIR whois servers
>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:   Sun Nov 09 16:00:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Matt D. Harris
>Release:        RELENG_7_0
>Organization:
>Environment:
FreeBSD rapier.mydomain 7.0-RELEASE-p5 FreeBSD 7.0-RELEASE-p5 #0: Thu Nov  6 14:39:04 PST 2008     root@rapier.mydomain:/usr/src/sys/i386/compile/RAPIER  i386

>Description:
An example:

(root@rapier) [/usr/local/etc]: whois 2001:960:800::2

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.                                              

No match for "2001:960:800::2".
>How-To-Repeat:
Run whois(1) on a given IPv6 address without using a command line option to specify the whois server address to utilize for query resolution.  

>Fix:
I've attached a patch which replicates the behavior which is exhibited for IPv4 - which is that ARIN is queried.  This results in ARIN saying it doesn't know about RIPE, etc records, however the same behavior exists when querying an IPv4 address.  My personal feeling is that replicating the behavior exhibited for IPv4 is superior to doing something wholly different, even if it isn't perfect.  In this case, I don't know if perfection is achievable.  

Until ARIN replicates the behavior which is exhibited for IPv4 in their whois server regarding RIPE, APNIC, and other RIR data, this is likely the best we can do.  


Patch attached with submission follows:

--- whois.c	2008-11-09 10:48:41.000000000 -0500
+++ /usr/src/usr.bin/whois/whois.c	2007-04-14 10:32:48.000000000 -0400
@@ -218,11 +218,6 @@
 {
 	char *pos, *retval;
 
-	if (strchr(domain, ':'))
-	{
-		s_asprintf(&retval, "%s", ANICHOST);
-		return (retval);
-	}
 	for (pos = strchr(domain, '\0'); pos > domain && *--pos == '.';)
 		*pos = '\0';
 	if (*domain == '\0')


>Release-Note:
>Audit-Trail:
>Unformatted:
 >>> Last update of whois database: Sun, 09 Nov 2008 10:14:51 EST <<<
 
 
 For IPv4 addresses, the correct RIR whois server is automagically queried.  For CC-TLD domain names, the same is true.  Unfortunately, IPv6 queries seem to go to a domain name whois server.  
 



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