Bug 191286 - jwhois.conf has problems on IPv6 address matching with missing leading 0's
jwhois.conf has problems on IPv6 address matching with missing leading 0's
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: jwhois (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-10 10:54 EDT by Peter Bieringer
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-21 11:09:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Peter Bieringer 2006-05-10 10:54:20 EDT
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-14 20:11:34 EDT
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 18:17:02 EDT
Created attachment 129129 [details]
Add type = cidr6

I have sent this patch upstream.
Comment 3 Miloslav Trmač 2006-05-21 11:09:11 EDT
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 10:18:46 EDT
Hmm...looks like they need much time for releasing a new version :-(
Comment 5 Peter Bieringer 2006-07-24 18:53:17 EDT
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.