Bug 133227 - [patch] whois(1): add support for SLD whois server lookups and IPv6 address lookups
Summary: [patch] whois(1): add support for SLD whois server lookups and IPv6 address l...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2009-03-31 00:00 UTC by Aragon Gouveia
Modified: 2017-12-31 22:34 UTC (History)
0 users

See Also:

file.diff (4.39 KB, patch)
2009-03-31 00:00 UTC, Aragon Gouveia
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aragon Gouveia 2009-03-31 00:00:09 UTC
When performing a domain name whois lookup, whois(1) performs a DNS lookup on <tld>.whois-servers.net to discover the authoritative whois server address.  This does not cater for some TLD registries that do not operate a TLD whois server, but operate one or many SLD whois servers below said TLD.  For example:

domain test.co.za
$ host za.whois-servers.net
Host za.whois-servers.net not found: 3(NXDOMAIN)
$ host co.za.whois-servers.net
co.za.whois-servers.net is an alias for whois.coza.net.za.
$ whois test.co.za
whois: za.whois-servers.net: hostname nor servname provided, or not known

The attached patch resolves this by first attempting to resolve co.za.whois-servers.net and using it if it resolves.  If not found, it will attempt za.whois-servers.net as normal.

In addition I have also integrated PR bin/128725 into my patch so that whois treats IPv6 address lookups the same as IPv4 addresses (sending the query to ARIN's whois server).

Fix: Patch attached with submission follows:
Comment 1 Aragon Gouveia 2009-05-07 05:07:36 UTC

Anyone had a look at this?
Comment 2 Aragon Gouveia 2009-07-03 14:39:53 UTC
Anyone care to take this?  It is a useful feature, really. :)
Comment 3 Edwin Groothuis freebsd_committer 2010-01-14 11:03:35 UTC
Responsible Changed
From-To: freebsd-bugs->edwin

Let me ponder on this for a week.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:39 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped