summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2010-01-14 10:56:54 +0000
committeredwin <edwin@FreeBSD.org>2010-01-14 10:56:54 +0000
commitee2386e55364ec40439a48af2238b5d627f6ff2d (patch)
tree6ec5a371cb74b1a6b12e3246d06ffc3efff6af65 /usr.bin/whois
parentea698e484348311877fac971cb9d80915811f88e (diff)
downloadFreeBSD-src-ee2386e55364ec40439a48af2238b5d627f6ff2d.zip
FreeBSD-src-ee2386e55364ec40439a48af2238b5d627f6ff2d.tar.gz
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" <mdh_lists@yahoo.com> MFC after: 1 week
Diffstat (limited to 'usr.bin/whois')
-rw-r--r--usr.bin/whois/whois.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index b1fea2b..864a585 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')
OpenPOWER on IntegriCloud