From e2377f6327a5c85eae700262f91254ef30c76b31 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 19 Jul 2016 09:43:22 +0200 Subject: [PATCH] Drop address from counthash when manually unblocking a host. 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 --- modules/Events.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/Events.pm b/modules/Events.pm index ec253c0..30fdd96 100644 --- a/modules/Events.pm +++ b/modules/Events.pm @@ -320,6 +320,12 @@ sub CallUnblock ($) { # 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; } -- 2.39.2