Bug 191286 - jwhois.conf has problems on IPv6 address matching with missing leading 0's
Summary: jwhois.conf has problems on IPv6 address matching with missing leading 0's
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: jwhois
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-05-10 14:54 UTC by Peter Bieringer
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-21 15:09:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Add type = cidr6 (9.36 KB, patch)
2006-05-15 22:17 UTC, Miloslav Trmač
no flags Details | Diff

Description Peter Bieringer 2006-05-10 14:54:20 UTC
Description of problem:
jwhois.conf contain some regular expressions to match IPv6 addresses and select
relatedwhois database.

Version-Release number of selected component (if applicable):
jwhois-3.2.3-4 (from devel)


How reproducible:
always


Steps to Reproduce:
1. Add a entry to /etc/jwhois.conf like 
        # 2A01:0000::/16
        "^2A01:[A-F0-9][A-F0-9][A-F0-9][A-F0-9]:.+" = "whois.ripe.net";
(this is according to newer data on IANA)

2. Try 
$ whois 2a01:800::/23
  
Actual results:
$ whois 2a01:800::/23|grep Querying
[Querying whois.internic.net]

Expected results:
Same result with leading "0" in the second address part:
$ whois 2a01:0800::/23|grep Querying
[Querying whois.ripe.net]


Additional info:
Looks like the solution to catch IPv6 addresses should be only a temporary one
and replaced by CIDR lookup like already implemented for IPv4.
See also https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143682#c0

I would suggest to take a look at my project ipv6calc
http://www.deepspace6.net/projects/ipv6calc.html

I have already implemented the registry selection by database. You will find
also code for "decompressing" IPv6 addresses and could use the database file
http://cvs.deepspace6.net/view/ipv6calc/databases/ipv6-assignment/dbipv6addr_assignment.h
to generate proper CIDR data for jwhois.conf from current data taken from the
registries.

Hopefully, one has time to implement this in the near future. Otherwise, I had
to look for some free time...

Comment 1 Miloslav Trmač 2006-05-15 00:11:34 UTC
Hello,
you can probably use
        "^2A01:[A-F0-9]?[A-F0-9]?[A-F0-9]?[A-F0-9]:.+" = "whois.ripe.net";
or in this case even
        "^2A01:.+" = ...

I agree jwhois should be doing a real subnet match, but that should happen
upstream, not as a Fedora-specific patch.  I'll try to prepare something....

Comment 2 Miloslav Trmač 2006-05-15 22:17:02 UTC
Created attachment 129129 [details]
Add type = cidr6

I have sent this patch upstream.

Comment 3 Miloslav Trmač 2006-05-21 15:09:11 UTC
The patch was accepted upstream, so Fedora should get it with a new upstream
release.

Thanks for your report.

Comment 4 Peter Bieringer 2006-07-18 14:18:46 UTC
Hmm...looks like they need much time for releasing a new version :-(

Comment 5 Peter Bieringer 2006-07-24 22:53:17 UTC
See also https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=199261 for RHEL4


Note You need to log in before you can comment on or make changes to this bug.