aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/whois
diff options
context:
space:
mode:
authorTony Finch <fanf@FreeBSD.org>2016-04-08 11:43:22 +0000
committerTony Finch <fanf@FreeBSD.org>2016-04-08 11:43:22 +0000
commit42e88fe650809fed3895c21c3a02d27c07cf0ca1 (patch)
tree7ff07e62fde8a28dc0cd7b089d337f074fdfad72 /usr.bin/whois
parentd416a6551475b7c0113ed4c66e2b1bfef72667da (diff)
Notes
Diffstat (limited to 'usr.bin/whois')
-rw-r--r--usr.bin/whois/whois.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 49b20057722bb..9bae3b1cabd4e 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -114,9 +114,16 @@ static struct {
WHOIS_REFERRAL("Whois Server:"),
WHOIS_REFERRAL("Registrar WHOIS Server:"), /* corporatedomains.com */
WHOIS_REFERRAL("ReferralServer: whois://"), /* ARIN */
+ WHOIS_REFERRAL("descr: region. Please query"), /* AfriNIC */
{ NULL, 0 }
};
+static const char *actually_arin[] = {
+ "netname: ERX-NETBLOCK\n", /* APNIC */
+ "netname: NON-RIPE-NCC-MANAGED-ADDRESS-BLOCK\n",
+ NULL
+};
+
static const char *port = DEFAULT_PORT;
static const char *choose_server(char *);
@@ -469,6 +476,12 @@ done:
(int)(p - host), host);
break;
}
+ for (i = 0; actually_arin[i] != NULL; i++) {
+ if (strncmp(buf, actually_arin[i], len) == 0) {
+ s_asprintf(&nhost, "%s", ANICHOST);
+ break;
+ }
+ }
}
/* Verisign etc. */
if (!(flags & WHOIS_SPAM_ME) &&