aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/whois
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2010-01-14 10:56:54 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2010-01-14 10:56:54 +0000
commit04961257f80ef01844ccf6af7baed6be291bb07a (patch)
tree6ec5a371cb74b1a6b12e3246d06ffc3efff6af65 /usr.bin/whois
parent3b81fe77122216b6ba63f30c2cc3af3427c0bc3f (diff)
downloadsrc-04961257f80ef01844ccf6af7baed6be291bb07a.tar.gz
src-04961257f80ef01844ccf6af7baed6be291bb07a.zip
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
Notes
Notes: svn path=/head/; revision=202281
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 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')