mirror of https://github.com/fail2ban/fail2ban
fix ban-time correction of restored tickets, could be set to persistent (-1) if increment allowed and no maxtime was specified.
parent
9de1657aab
commit
6e40cb12ab
|
@ -806,7 +806,7 @@ class Fail2BanDb(object):
|
||||||
if bantime == -2: # todo: remove it in future version
|
if bantime == -2: # todo: remove it in future version
|
||||||
bantime = jail.actions.getBanTime() if jail is not None else (
|
bantime = jail.actions.getBanTime() if jail is not None else (
|
||||||
correctBanTime if correctBanTime else 600)
|
correctBanTime if correctBanTime else 600)
|
||||||
elif correctBanTime:
|
elif correctBanTime and correctBanTime >= 0:
|
||||||
# if persistent ban (or greater as max), use current max-bantime of the jail:
|
# if persistent ban (or greater as max), use current max-bantime of the jail:
|
||||||
if bantime == -1 or bantime > correctBanTime:
|
if bantime == -1 or bantime > correctBanTime:
|
||||||
bantime = correctBanTime
|
bantime = correctBanTime
|
||||||
|
|
Loading…
Reference in New Issue