forked from pool/perl-Net-IP
- ipcount: fix the use of + in the address range (boo#942108) * added ipcount-invalid_chars_in_IP.patch * added cpanspec.yml OBS-URL: https://build.opensuse.org/request/show/331542 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-IP?expand=0&rev=21
31 lines
924 B
Diff
31 lines
924 B
Diff
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++;
|
|
}
|