mirror of
https://github.com/rfc1036/whois.git
synced 2026-08-01 07:20:13 +00:00
Support CIDR queries to whois.arin.net
This is a behaviour change: in this case the client used to use the parameters for non-CIDR queries, so the server would return nothing. Now an exact match for the provided ip/length query is requested. If the query is not an exact match then this is also different from the default behaviour of the server, which is to return a non-verbose summary of all less specific networks.
This commit is contained in:
parent
326d220078
commit
751c9cc397
5
whois.c
5
whois.c
@ -693,7 +693,10 @@ char *queryformat(const char *server, const char *flags, const char *query)
|
||||
strcat(buf, "a ");
|
||||
strcat(buf, query + 2);
|
||||
} else if (myinet_aton(query) || strchr(query, ':')) {
|
||||
strcat(buf, "n + ");
|
||||
if (strchr(query, '/'))
|
||||
strcat(buf, "r + = ");
|
||||
else
|
||||
strcat(buf, "n + ");
|
||||
strcat(buf, query);
|
||||
} else
|
||||
strcat(buf, query);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user