Browse Source

* check if source needs filter

master
Alex 'AdUser' Z 3 years ago
parent
commit
444922f45a
  1. 6
      src/jail.c

6
src/jail.c

@ -14,6 +14,7 @@
#include "filter.h"
#include "backend.h"
#include "statefile.h"
#include "mod-defs.h"
#include "jail.h"
#define DEFAULT_BANTIME 3600 /* in seconds, 1 hour */
@ -373,6 +374,11 @@ f2b_jail_init(f2b_jail_t *jail, f2b_config_t *config) {
goto cleanup;
}
if (jail->source->flags & MOD_NEED_FILTER && !(jail->flags & JAIL_HAS_FILTER)) {
f2b_log_msg(log_error, "jail '%s': source '%s' needs filter, but jail has no one", jail->name, jail->source->name);
goto cleanup;
}
if ((section = f2b_config_section_find(config->filters, jail->filter->name)) == NULL) {
f2b_log_msg(log_error, "jail '%s': no filter with name '%s'", jail->name, jail->filter->name);
goto cleanup;

Loading…
Cancel
Save