From 7cc64a14e03a43db852eb3c2452892cde6acc53c Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Sun, 27 Apr 2014 13:27:11 +0100 Subject: [PATCH] BF: fail2ban-regex assertion error caused by miscounted "missed" lines Caused when removing lines as part of multiline regex, which had been previously considered missed. --- ChangeLog | 2 ++ bin/fail2ban-regex | 1 + 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index bb1fd707..bbe32054 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ ver. 0.9.1 (2014/xx/xx) - better, faster, stronger * Handle case when no sqlite library is available for persistent database * Only reban once per IP from database on fail2ban restart * Nginx filter to support missing server_name. Closes gh-676 + * fail2ban-regex assertion error caused by miscount missed lines with + multiline regex - New features: diff --git a/bin/fail2ban-regex b/bin/fail2ban-regex index ef198dcb..974566bc 100755 --- a/bin/fail2ban-regex +++ b/bin/fail2ban-regex @@ -344,6 +344,7 @@ class Fail2banRegex(object): pass else: self._line_stats.matched += 1 + self._line_stats.missed -= 1 return line, ret def process(self, test_lines):