summaryrefslogtreecommitdiff
path: root/whois.c
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2017-07-27 16:55:20 +0200
committerMarco d'Itri <md@linux.it>2017-07-27 16:55:20 +0200
commit89d2aef1581df9038de4d9e81fab239b03f9ea8c (patch)
tree24ed66559826803a478f9654a407dd59a3ee5236 /whois.c
parentba9500eb9d8f91bff860c2f854b701687b15173a (diff)
downloadwhois-89d2aef1581df9038de4d9e81fab239b03f9ea8c.tar.gz
Fix referrals for .com, .net, .jobs, .bz, .cc and .tv
ICANN mandated that the referral whois server field had to be renamed, hence breaking all whois clients: https://www.icann.org/resources/pages/rdds-labeling-policy-2017-02-01-en Closes #56 from Github.
Diffstat (limited to 'whois.c')
-rw-r--r--whois.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/whois.c b/whois.c
index abbcd98..7c2860f 100644
--- a/whois.c
+++ b/whois.c
@@ -834,8 +834,7 @@ char *query_crsnic(const int sock, const char *query)
is queried */
if (state == 0 && strneq(buf, " Domain Name:", 15))
state = 1;
- if (state == 1 && (strneq(buf, " Whois Server:", 16)
- || strneq(buf, " WHOIS Server:", 16))) {
+ if (state == 1 && strneq(buf, " Registrar WHOIS Server:", 26)) {
for (p = buf; *p != ':'; p++); /* skip until the colon */
for (p++; *p == ' '; p++); /* skip the spaces */
referral_server = strdup(p);
@@ -884,7 +883,7 @@ char *query_afilias(const int sock, const char *query)
This is not supposed to happen. */
if (state == 0 && strneq(buf, "Domain Name:", 12))
state = 1;
- if (state == 1 && strneq(buf, "Whois Server:", 13)) {
+ if (state == 1 && strneq(buf, "Registrar WHOIS Server:", 23)) {
for (p = buf; *p != ':'; p++); /* skip until colon */
for (p++; *p == ' '; p++); /* skip colon and spaces */
referral_server = strdup(p);