Skip Menu |
 

This queue is for tickets about the Net-IP CPAN distribution.

Report information
The Basics
Id: 106506
Status: resolved
Priority: 0/
Queue: Net-IP

People
Owner: cpan [...] bat.ru
Requestors: robert [...] spitzenpfeil.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: ipcount not working properly
Date: Tue, 18 Aug 2015 13:30:02 +0200
To: bug-Net-IP [...] rt.cpan.org
From: Robert Spitzenpfeil <robert [...] spitzenpfeil.org>
Download (untitled) / with headers
text/plain 533b
The issue + fix is described here in great detail: http://www.technicalmisery.com/2008/12/ipcount-handy-tool-for-ip-address.html My data: * openSUSE 13.2: perl-Net-IP-1.26-4.1.3.x86_64 * This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux-thread-multi Name: perl-Net-IP Url: http://cpan.org/modules/by-module/Net/ Provides: perl_Net-IP Obsoletes: perl_Net-IP Summary: allow easy manipulation of IPv4 and IPv6 addresses License: Artistic-1.0 Group: Development/Libraries/Perl Version: 1.26 Release: 4.1.3
From: vcizek [...] suse.cz
Download (untitled) / with headers
text/plain 244b
On Tue Aug 18 07:36:36 2015, robert@spitzenpfeil.org wrote: Show quoted text
> The issue + fix is described here in great detail: > > http://www.technicalmisery.com/2008/12/ipcount-handy-tool-for-ip- > address.html
Attaching the patch extracted from the blog.
Subject: ipcount-invalid_chars_in_IP.patch
Index: Net-IP-1.26/ipcount =================================================================== --- Net-IP-1.26.orig/ipcount 2005-10-18 11:59:52.000000000 +0200 +++ Net-IP-1.26/ipcount 2015-09-16 13:50:21.639082216 +0200 @@ -51,6 +51,7 @@ getopts ('rd:',\%opts); scalar (@ARGV) < 1 and usage(); my $arg = join '',@ARGV; $arg =~ s/\s+//g; +$arg =~ s/\+/ \+ /g; my $ip = new Net::IP($arg) or die ("Cannot create IP object $arg: ".Error()); @@ -77,7 +78,7 @@ if ($opts{d}) while ($current->bincomp ('lt', $last)) { - $new_ip->set($current->last_ip.'+'.$size) or die (Error()); + $new_ip->set($current->last_ip.' + '.$size) or die (Error()); print $new_ip->print,"\n"; if ($opts{r}) @@ -85,7 +86,7 @@ if ($opts{d}) print $new_ip->reverse_ip,"\n"; } - $current->set($new_ip->last_ip .'+ 1') or die (Error()); + $current->set($new_ip->last_ip .' + 1') or die (Error()); $count++; }
Fix isn't really a proper one, but gave a hint where the problem is. Should be available in 1.27.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.