Bug#505736: updated webgeo2ipct.pl
gregor herrmann
gregoa at debian.org
Sat Nov 15 17:58:52 UTC 2008
On Sat, 15 Nov 2008 15:53:10 +0100, Claus Herwig wrote:
> As per request I just updated webgeo2ipct.pl to include a license
> comment. New file is attached.
Thanks alot, committed to our subversion repository.
There's one other issue where you maybe could help:
With the new database the test script fails because some IP ranges
change. No surprise so far. The failures can be seen in a patch I
prepared:
#v+
--- a/test.pl
+++ b/test.pl
@@ -9,12 +9,12 @@
######################### localhost
my ($country,$country_name,$ip) = Geo::IPfree::LookUp("127.0.0.1") ;
-ok($country,'L0');
+ok($country,'ZZ');
######################### intranet
my ($country,$country_name,$ip) = Geo::IPfree::LookUp("10.0.0.1") ;
-ok($country,'I0');
+ok($country,'ZZ');
######################### www.nic.br
@@ -29,7 +29,7 @@
######################### www.nic.fr
my ($country,$country_name,$ip) = Geo::IPfree::LookUp("192.134.4.20") ;
-ok($country,'FR');
+ok($country,'EU');
#########################
#v-
The interesting failures are the first 2 ones:
AFAICS the new database returns ZZ for all IANA reserved addresses
(42 entries).
The old database seems to have different values for some private/RFC 1918
addresses; I've converted the old database with ipct2txt.pl into text
format and found the following lines (without guarantee of
completeness):
#v+
I0: 10.0.0.0 10.255.255.255
L0: 127.0.0.0 127.255.255.255
I0: 192.168.0.0 192.168.255.255
#v-
(172.16/12 is wrongly attributed ...)
Now I'm not sure what to do:
* leave IpToCountry.csv as it is, patch the test, and document the
changed return value in NEWS.Debian maybe;
might be problematic if applications rely on I0/L0 for local
address space (and that's the real concern with this change);
in the Debian archive awstats is the only reverse dependency for
libgeo-ipfree-perl (as a Suggests, and I can't find L0 or I0 in the
code), but still ...
* patch the three relevant lines in IpToCountry.csv to return the
"old" values; no big deal, helps "old" applications but leads to
inconsistent return values for IANA reserved addresses
Since I don't find any traces of the old return values in code in
Debian at the first glance I tend to take the first option.
Any suggestions appreciated.
Cheers,
gregor
--
.''`. Home: http://info.comodo.priv.at/{,blog/} / GPG Key ID: 0x00F3CFE4
: :' : Debian GNU/Linux user, admin, & developer - http://www.debian.org/
`. `' Member of VIBE!AT, SPI Inc., fellow of FSFE | http://got.to/quote/
`- NP: Don McLean: Fool's Paradise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20081115/7a5a96e6/attachment-0001.pgp
More information about the pkg-perl-maintainers
mailing list