X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCIDR.pm;h=2ef0d1937954dccd2f004bd5777e72a9da773e92;hb=3b87cb901b1aa6604814d3f585561a404603f43f;hp=230920f97be01ebd77a8db69b052a9d01770e4d6;hpb=61fe8f951eba89d430046d23bca9d65b30561578;p=spider.git diff --git a/perl/DXCIDR.pm b/perl/DXCIDR.pm index 230920f9..2ef0d193 100644 --- a/perl/DXCIDR.pm +++ b/perl/DXCIDR.pm @@ -85,6 +85,8 @@ sub _put sub add { + my $count = 0; + for my $ip (@_) { # protect against stupid or malicious next if /^127\./; @@ -95,6 +97,7 @@ sub add next; } $ipv4->add_any($ip); + ++$count; ++$count4; } elsif (/:/) { if ($ipv6->find($ip)) { @@ -102,6 +105,7 @@ sub add next; } $ipv6->add_any($ip); + ++$count; ++$count6; LogDbg('DXProt', "DXCIDR: Added IPV6 $ip address"); } @@ -114,6 +118,7 @@ sub add $ipv6->prep_find; _put($ipv6, 6); } + return $count; } sub save