Browse Source

* jail.c : save statefile on new baned ip

master
Alex 'AdUser' Z 8 years ago
parent
commit
b396d8d844
  1. 7
      src/jail.c

7
src/jail.c

@ -276,6 +276,8 @@ f2b_jail_process(f2b_jail_t *jail) {
}
/* limit reached, ban ip */
f2b_jail_ban(jail, addr);
if (jail->flags & JAIL_HAS_STATE)
jail->sfile->need_save = true;
} /* while(1) */
for (addr = jail->ipaddrs, prev = NULL; addr != NULL; ) {
@ -312,6 +314,11 @@ f2b_jail_process(f2b_jail_t *jail) {
}
}
if (jail->flags & JAIL_HAS_STATE && jail->sfile->need_save) {
f2b_statefile_save(jail->sfile, jail->ipaddrs);
jail->sfile->need_save = false;
}
return processed;
}

Loading…
Cancel
Save