[packages/fail2ban] lag-visibility: warn every 60s for any behind-clock entry; rel 8 past 55min lag the label flips to "
arekm
arekm at pld-linux.org
Wed Jul 22 14:58:44 CEST 2026
commit 8d587070da6b377e4a23dcbf02f66646c2e5182e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Jul 22 14:34:36 2026 +0200
lag-visibility: warn every 60s for any behind-clock entry; rel 8
past 55min lag the label flips to "timezone" and warnings fell back to once/day - going silent exactly when lag is worst
fail2ban-lag-visibility.patch | 16 ++++++++--------
fail2ban.spec | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/fail2ban.spec b/fail2ban.spec
index 6790be9..2adb568 100644
--- a/fail2ban.spec
+++ b/fail2ban.spec
@@ -2,7 +2,7 @@ Summary: Ban IPs that make too many password failures
Summary(pl.UTF-8): Blokowanie IP powodujących zbyt dużo prób logowań z błędnym hasłem
Name: fail2ban
Version: 1.1.0
-Release: 7
+Release: 8
License: GPL
Group: Daemons
Source0: https://github.com/fail2ban/fail2ban/archive/%{version}.tar.gz
diff --git a/fail2ban-lag-visibility.patch b/fail2ban-lag-visibility.patch
index c2019d9..4dd72b7 100644
--- a/fail2ban-lag-visibility.patch
+++ b/fail2ban-lag-visibility.patch
@@ -1,6 +1,6 @@
diff -ru a/fail2ban/server/actions.py b/fail2ban/server/actions.py
---- a/fail2ban/server/actions.py 2026-07-22 10:20:01.701693349 +0200
-+++ b/fail2ban/server/actions.py 2026-07-22 10:20:01.702622778 +0200
+--- a/fail2ban/server/actions.py 2026-07-22 14:29:42.498472766 +0200
++++ b/fail2ban/server/actions.py 2026-07-22 14:29:42.499409098 +0200
@@ -503,7 +503,10 @@
# report ticket to observer, to check time should be increased and hereafter observer writes ban to database (asynchronous)
if Observers.Main is not None and not bTicket.restored:
@@ -26,8 +26,8 @@ diff -ru a/fail2ban/server/actions.py b/fail2ban/server/actions.py
if bTicket.banEpoch == self.banEpoch and diftm > 3:
# avoid too often checks:
diff -ru a/fail2ban/server/filter.py b/fail2ban/server/filter.py
---- a/fail2ban/server/filter.py 2026-07-22 10:20:01.701886387 +0200
-+++ b/fail2ban/server/filter.py 2026-07-22 10:20:01.703064899 +0200
+--- a/fail2ban/server/filter.py 2026-07-22 14:29:42.498681467 +0200
++++ b/fail2ban/server/filter.py 2026-07-22 14:29:42.499830570 +0200
@@ -606,12 +606,12 @@
if self.__ignoreCache: c.set(key, False)
return False
@@ -49,9 +49,9 @@ diff -ru a/fail2ban/server/filter.py b/fail2ban/server/filter.py
delta = int(date - MyTime.time())
if abs(delta) > 60:
- # log timing issue as warning once per day:
-+ # latency (backlog) is transient - surface it periodically so
-+ # "fail2ban is N behind" stays visible; a timezone skew is a static
-+ # misconfig, so leave that at once/day
++ # entries behind the clock (backlog catch-up, however deep) must
++ # stay visible every minute - lag can grow past the 55m "latency"
++ # label cutoff; only ahead-of-clock (timezone east) stays daily
+ latency = -3300 <= delta < 0
self._logWarnOnce("_next_simByTimeWarn",
("Detected a log entry %s %s the current time in operation mode. "
@@ -63,7 +63,7 @@ diff -ru a/fail2ban/server/filter.py b/fail2ban/server/filter.py
("Please check a jail for a timing issue. Line with odd timestamp: %s",
- line))
+ line),
-+ interval=60 if latency else 24*60*60)
++ interval=60 if delta < 0 else 24*60*60)
# simulate now as date:
date = MyTime.time()
self.__lastDate = date
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fail2ban.git/commitdiff/8d587070da6b377e4a23dcbf02f66646c2e5182e
More information about the pld-cvs-commit
mailing list