Browse Source

* move jails list and use it via extern

master
Alex 'AdUser' Z 8 years ago
parent
commit
a5c7652946
  1. 1
      src/daemon.c
  2. 2
      src/jail.c
  3. 2
      src/jail.h

1
src/daemon.c

@ -40,7 +40,6 @@ struct {
}; };
enum { stop = 0, run, reconfig, logrotate, test } state = run; enum { stop = 0, run, reconfig, logrotate, test } state = run;
f2b_jail_t *jails = NULL;
void signal_handler(int signum) { void signal_handler(int signum) {
switch (signum) { switch (signum) {

2
src/jail.c

@ -13,6 +13,8 @@
#define DEFAULT_EXPIRETIME 14400 /* in seconds, 4 hours */ #define DEFAULT_EXPIRETIME 14400 /* in seconds, 4 hours */
#define DEFAULT_MAXRETRY 5 #define DEFAULT_MAXRETRY 5
f2b_jail_t *jails = NULL;
static f2b_jail_t defaults = { static f2b_jail_t defaults = {
.enabled = DEFAULT_STATE, .enabled = DEFAULT_STATE,
.bantime = DEFAULT_BANTIME, .bantime = DEFAULT_BANTIME,

2
src/jail.h

@ -39,6 +39,8 @@ typedef struct f2b_jail_t {
f2b_ipaddr_t *ipaddrs; f2b_ipaddr_t *ipaddrs;
} f2b_jail_t; } f2b_jail_t;
extern f2b_jail_t *jails;
void f2b_jail_parse_compound_value(const char *value, char *name, char *init); void f2b_jail_parse_compound_value(const char *value, char *name, char *init);
f2b_jail_t *f2b_jail_create (f2b_config_section_t *section); f2b_jail_t *f2b_jail_create (f2b_config_section_t *section);

Loading…
Cancel
Save