When a host address manualy get unblocked by calling the
unblock command via socket connection, the address now
will be dropped from counthash too.
If an address get unblocked because the configured BlockTime ends,
the entry still remains in the counthash and will be blocked again,
next time the address will be counted.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
# Drop address from blockhash.
delete ($blockhash{$address});
+ # Drop address from counthash if the address has been unblocked
+ # by the user. This happens when the called module is "Socket".
+ if ($module eq "Socket") {
+ delete ($counthash{$address});
+ }
+
# Everything worked well, return nothing.
return undef;
}