Bug#508775: libnetaddr-ip-perl/NetAddr::IP should parse address<space>netmask aswell [patch]
Florian Lohoff
flo at rfc822.org
Mon Dec 15 10:25:15 UTC 2008
Hi,
something like this solves it although i have no idea about the
implications ... Havent run the testsuite ...
--- NetAddr/IP/Lite.pm.orig 2008-12-15 11:18:53.000000000 +0100
+++ NetAddr/IP/Lite.pm 2008-12-15 11:19:00.000000000 +0100
@@ -516,7 +516,7 @@
while (1) {
unless (@_) {
- if ($ip =~ m!^(.+)/(.+)$!) {
+ if ($ip =~ m!^(.+)[/ ](.+)$!) {
$ip = $1;
$mask = $2;
} elsif (grep($ip eq $_,qw(default any broadcast loopback unspecified))) {
perl -e 'use NetAddr::IP; $i=new NetAddr::IP "10.0.0.1 255.255.255.0" or die; print $i->addr . "\n"'
10.0.0.1
Flo
--
Florian Lohoff flo at rfc822.org +49-171-2280134
Those who would give up a little freedom to get a little
security shall soon have neither - Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20081215/d3e4f977/attachment.pgp
More information about the pkg-perl-maintainers
mailing list