diff options
author | Marco d'Itri <md@linux.it> | 2006-09-15 00:07:49 +0200 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2013-03-30 02:31:34 +0100 |
commit | e5c1a36ec18e55c8c0a658b3dda5d8746f5d6a61 (patch) | |
tree | 9e85bcf6e1e56f9b0265c60aaaf7ed933c2ab0ec /whois.c | |
parent | 7c5dbcc6c6607a113e3414483d9f2b23f55d5070 (diff) | |
download | whois-e5c1a36ec18e55c8c0a658b3dda5d8746f5d6a61.tar.gz |
Imported Debian version 4.7.16v4.7.16
Diffstat (limited to 'whois.c')
-rw-r--r-- | whois.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -432,7 +432,7 @@ const char *whereas(const unsigned short asn) char *queryformat(const char *server, const char *flags, const char *query) { - char *buf; + char *buf, *p; int i, isripe = 0; /* 64 bytes reserved for server-specific flags added later */ @@ -480,6 +480,9 @@ char *queryformat(const char *server, const char *flags, const char *query) sprintf(buf, "%s/e", query); /* ask for english text */ else strcat(buf, query); + } else if (!isripe && strcmp(server, "whois.arin.net") == 0 && + (p = strrchr(query, '/'))) { + strncat(buf, query, p - query); /* strip CIDR */ } else strcat(buf, query); return buf; |