projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add load/badip.pl
[spider.git]
/
perl
/
DXCIDR.pm
diff --git
a/perl/DXCIDR.pm
b/perl/DXCIDR.pm
index 230920f97be01ebd77a8db69b052a9d01770e4d6..2ef0d1937954dccd2f004bd5777e72a9da773e92 100644
(file)
--- a/
perl/DXCIDR.pm
+++ b/
perl/DXCIDR.pm
@@
-85,6
+85,8
@@
sub _put
sub add
{
sub add
{
+ my $count = 0;
+
for my $ip (@_) {
# protect against stupid or malicious
next if /^127\./;
for my $ip (@_) {
# protect against stupid or malicious
next if /^127\./;
@@
-95,6
+97,7
@@
sub add
next;
}
$ipv4->add_any($ip);
next;
}
$ipv4->add_any($ip);
+ ++$count;
++$count4;
} elsif (/:/) {
if ($ipv6->find($ip)) {
++$count4;
} elsif (/:/) {
if ($ipv6->find($ip)) {
@@
-102,6
+105,7
@@
sub add
next;
}
$ipv6->add_any($ip);
next;
}
$ipv6->add_any($ip);
+ ++$count;
++$count6;
LogDbg('DXProt', "DXCIDR: Added IPV6 $ip address");
}
++$count6;
LogDbg('DXProt', "DXCIDR: Added IPV6 $ip address");
}
@@
-114,6
+118,7
@@
sub add
$ipv6->prep_find;
_put($ipv6, 6);
}
$ipv6->prep_find;
_put($ipv6, 6);
}
+ return $count;
}
sub save
}
sub save