From 04961257f80ef01844ccf6af7baed6be291bb07a Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Thu, 14 Jan 2010 10:56:54 +0000 Subject: [PATCH] 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 --- usr.bin/whois/whois.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index b1fea2bcbb2b..864a58539b58 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -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')