Browse Source

* update f2b_jail_process() definition & docs

master
Alex 'AdUser' Z 4 years ago
parent
commit
4752dd8aa6
  1. 5
      src/jail.c
  2. 6
      src/jail.h

5
src/jail.c

@ -226,13 +226,12 @@ f2b_jail_find(f2b_jail_t *list, const char *name) {
return NULL;
}
size_t
void
f2b_jail_process(f2b_jail_t *jail) {
f2b_match_t *match = NULL;
f2b_ipaddr_t *prev = NULL;
f2b_ipaddr_t *addr = NULL;
unsigned int hostc = 0;
size_t processed = 0;
char line[LOGLINE_MAX] = "";
char matchbuf[IPADDR_MAX] = "";
time_t now = time(NULL);
@ -327,7 +326,7 @@ f2b_jail_process(f2b_jail_t *jail) {
jail->sfile->need_save = false;
}
return processed;
return;
}
bool

6
src/jail.h

@ -98,12 +98,12 @@ bool f2b_jail_init(f2b_jail_t *jail, f2b_config_t *config);
*/
bool f2b_jail_start(f2b_jail_t *jail);
/**
* @brief Jail maintenance routine
* Polls source for data, match against filter, manage matches,
* @brief Jail main maintenance routine
* Polls source for data, match against filter (if set), manage matches,
* ban ips, that exceeded their limit, unban ips after bantime expire
* @param jail Jail for processing
*/
size_t f2b_jail_process (f2b_jail_t *jail);
void f2b_jail_process (f2b_jail_t *jail);
/**
* @brief Correctly shutdown given jail
* @param jail Jail pointer

Loading…
Cancel
Save