Subject: bin/36957: whois does not follow AfriNIC referral
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <sm@resistor.net>
List: netbsd-bugs
Date: 09/09/2007 16:20:00
>Number: 36957
>Category: bin
>Synopsis: whois does not follow AfriNIC referral
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Sep 09 16:20:00 +0000 2007
>Originator: sm
>Release: 3.0
>Organization:
>Environment:
NetBSD sm.private 3.0_STABLE NetBSD 3.0_STABLE (SM) #6: Sat May 6 18:17:55 PDT 2006 sm@sm@private:/usr/obj/sys/arch/i386/compile/SM i386
>Description:
whois does not follow referral to AfriNIC (whois.afrinic.net).
>How-To-Repeat:
#whois 41.0.0.0
OrgName: African Network Information Center
OrgID: AFRINIC
Address: 03B3 - 3rd Floor - Ebene Cyber Tower
Address: Cyber City
Address: Ebene
Address: Mauritius
City: Ebene
StateProv:
PostalCode: 0001
Country: MU
ReferralServer: whois://whois.afrinic.net
NetRange: 41.0.0.0 - 41.255.255.255
CIDR: 41.0.0.0/8
NetName: NET41
NetHandle: NET-41-0-0-0-1
Parent:
NetType: Allocated to AfriNIC
NameServer: NS1.AFRINIC.NET
NameServer: NS-SEC.RIPE.NET
NameServer: NS.LACNIC.NET
NameServer: TINNIE.ARIN.NET
Comment:
RegDate: 2005-04-12
Updated: 2005-07-12
OrgAbuseHandle: GENER11-ARIN
OrgAbuseName: Generic POC
OrgAbusePhone: +230 4666616
OrgAbuseEmail: abusepoc@afrinic.net
OrgTechHandle: GENER11-ARIN
OrgTechName: Generic POC
OrgTechPhone: +230 4666616
OrgTechEmail: abusepoc@afrinic.net
# ARIN WHOIS database, last updated 2007-09-08 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
The correct output should be:
OrgName: African Network Information Center
OrgID: AFRINIC
Address: 03B3 - 3rd Floor - Ebene Cyber Tower
Address: Cyber City
Address: Ebene
Address: Mauritius
City: Ebene
StateProv:
PostalCode: 0001
Country: MU
ReferralServer: whois://whois.afrinic.net
NetRange: 41.0.0.0 - 41.255.255.255
CIDR: 41.0.0.0/8
NetName: NET41
NetHandle: NET-41-0-0-0-1
Parent:
NetType: Allocated to AfriNIC
NameServer: NS1.AFRINIC.NET
NameServer: NS-SEC.RIPE.NET
NameServer: NS.LACNIC.NET
NameServer: TINNIE.ARIN.NET
Comment:
RegDate: 2005-04-12
Updated: 2005-07-12
OrgAbuseHandle: GENER11-ARIN
OrgAbuseName: Generic POC
OrgAbusePhone: +230 4666616
OrgAbuseEmail: abusepoc@afrinic.net
OrgTechHandle: GENER11-ARIN
OrgTechName: Generic POC
OrgTechPhone: +230 4666616
OrgTechEmail: abusepoc@afrinic.net
# ARIN WHOIS database, last updated 2007-09-08 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
% This is the AfriNIC Whois server.
% Note: this output has been filtered.
% Information related to '41.0.0.0 - 41.255.255.255'
inetnum: 41.0.0.0 - 41.255.255.255
netname: AFRINIC-042005
descr:
descr: AfriNIC - www.afrinic.net
descr: Allocation for Africa - This block is in use
descr: by AfriNIC for allocating/assigning to networks
descr: in the AfriNIC service region.
descr: More information - whois.afrinic.net.
descr: Abuse - please querry the whois db for the
descr: contacts of the assigned/allocated prefix.
descr:
country: MU
org: ORG-AFNC1-AFRINIC
admin-c: TEAM-AFRINIC
tech-c: TEAM-AFRINIC
status: ALLOCATED UNSPECIFIED
mnt-by: AFRINIC-HM-MNT
mnt-lower: AFRINIC-HM-MNT
source: AFRINIC # Filtered
parent: 0.0.0.0 - 255.255.255.255
organisation: ORG-AFNC1-AFRINIC
org-name: AfriNIC - The African Network Information Centre
org-type: RIR
country: MU
address: =======================================
address: Office 03B3, 3rd Floor Cyber Tower
address: Port Louis
address: Mauritius
address:
phone: +230 466 6616
fax-no: +230 466 6758
remarks:
e-mail: contact@afrinic.net
admin-c: TEAM-AFRINIC
tech-c: TEAM-AFRINIC
remarks:
remarks: =======================================
remarks:
remarks: For more information on AFRINIC assigned blocks,
remarks: querry whois.afrinic.net port 43, or the web based
remarks: query at http://whois.afrinic.net or www.afrinic.net
remarks:
remarks: website: www.afrinic.net
remarks:
remarks: Other Contacts:
remarks: ===============
remarks: hostmaster@afrinic.net - for IP resources
remarks: new-member@afrinic.net - for new members and other
remarks: inquiries.
remarks:
mnt-ref: AFRINIC-DB-MNT
mnt-by: AFRINIC-DB-MNT
source: AFRINIC # Filtered
role: AfriNIC TEAM
address: Office 03B3, 3rd Floor Cyber Tower
address: Port Louis
phone: +230 466 6616
fax-no: +230 466 6758
admin-c: AA1-AFRINIC
tech-c: HARI-AFRINIC
nic-hdl: TEAM-AFRINIC
e-mail: sysadmin@afrinic.net
mnt-by: AFRINIC-DB-MNT
source: AFRINIC # Filtered
>Fix:
--- usr.bin/whois/whois.c.orig 2007-09-09 06:39:13.000000000 -0700
+++ usr.bin/whois/whois.c 2007-09-09 07:31:29.000000000 -0700
@@ -68,6 +68,7 @@
#define ANICHOST "whois.arin.net"
#define RNICHOST "whois.ripe.net"
#define PNICHOST "whois.apnic.net"
+#define FNICHOST "whois.afrinic.net"
#define RUNICHOST "whois.ripn.net"
#define MNICHOST "whois.ra.net"
#define LNICHOST "whois.lacnic.net"
@@ -83,7 +84,7 @@
static const char *port_whois = WHOIS_PORT;
static const char *ip_whois[] =
- { LNICHOST, RNICHOST, PNICHOST, BNICHOST, NULL };
+ { LNICHOST, RNICHOST, PNICHOST, FNICHOST, BNICHOST, NULL };
static void usage(void) __attribute__((__noreturn__));
static int whois(const char *, const char *, const char *, int);
@@ -100,7 +101,7 @@
#endif
country = host = server = NULL;
flags = rval = 0;
- while ((ch = getopt(argc, argv, "6Aac:dgh:ilmp:qQRr")) != -1)
+ while ((ch = getopt(argc, argv, "6Aac:dfgh:ilmp:qQRr")) != -1)
switch(ch) {
case 'a':
host = ANICHOST;
@@ -114,6 +115,9 @@
case 'd':
host = DNICHOST;
break;
+ case 'f':
+ host = FNICHOST;
+ break;
case 'g':
host = GNICHOST;
break;
--- usr.bin/whois/whois.1.orig 2007-09-09 07:10:32.000000000 -0700
+++ usr.bin/whois/whois.1 2007-09-09 08:02:50.000000000 -0700
@@ -38,7 +38,7 @@
.Nd Internet domain name and network number directory service
.Sh SYNOPSIS
.Nm whois
-.Op Fl 6AadgilmQRr
+.Op Fl 6AadfgilmQRr
.Oo
.Fl c Ar country-code | Fl h Ar host
.Oc
@@ -69,9 +69,11 @@
.Pq Tn ARIN
database.
It contains network numbers used in those parts of the world
-covered neither by
-.Tn APNIC
-nor by
+not covered by
+.Tn AfriNIC,
+.Tn APNIC,
+.Tn LACNIC
+or by
.Tn RIPE .
.Pp
(Hint: All point of contact handles in the
@@ -87,6 +89,11 @@
Use the US Department of Defense database.
It contains points of contact for subdomains of
.Tn \&.MIL .
+.It Fl f
+Use the African Network Information Center
+.Pq Tn AfriNIC
+database.
+It contains network numbers used in Africa
.It Fl g
Use the US non-military federal government database, which contains points of
contact for subdomains of
@@ -113,7 +120,7 @@
If a query to
.Tn ARIN
references
-.Tn APNIC , LACNIC ,
+.Tn AfriNIC, APNIC , LACNIC ,
or
.Tn RIPE ,
that server will be queried also, provided that the