From owner-svn-src-all@FreeBSD.ORG Thu Jan 14 10:56:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2501106566C; Thu, 14 Jan 2010 10:56:54 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C17A48FC13; Thu, 14 Jan 2010 10:56:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0EAus1J010814; Thu, 14 Jan 2010 10:56:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0EAusZL010812; Thu, 14 Jan 2010 10:56:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201001141056.o0EAusZL010812@svn.freebsd.org> From: Edwin Groothuis Date: Thu, 14 Jan 2010 10:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202281 - head/usr.bin/whois X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2010 10:56:54 -0000 Author: edwin Date: Thu Jan 14 10:56:54 2010 New Revision: 202281 URL: http://svn.freebsd.org/changeset/base/202281 Log: Make whois capable of searching for IPv6 addresses just like it can do for IPv4 addresses without having to explicetly specify that the ARIN server should be used to get the initial information PR: bin/128725 Submitted by: "Matt D. Harris" MFC after: 1 week Modified: head/usr.bin/whois/whois.c Modified: head/usr.bin/whois/whois.c ============================================================================== --- head/usr.bin/whois/whois.c Thu Jan 14 10:40:54 2010 (r202280) +++ head/usr.bin/whois/whois.c Thu Jan 14 10:56:54 2010 (r202281) @@ -215,6 +215,10 @@ choose_server(char *domain) { 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')