Browse Source

* daemon.c : update f2b_cmsg_process()

master
Alex 'AdUser' Z 8 years ago
parent
commit
5ee661248a
  1. 10
      src/daemon.c

10
src/daemon.c

@ -164,14 +164,10 @@ f2b_cmsg_process(const f2b_cmsg_t *msg, char *res, size_t ressize) {
snprintf(res, ressize, "can't find ip '%s' in jail '%s'\n", args[1], args[0]); snprintf(res, ressize, "can't find ip '%s' in jail '%s'\n", args[1], args[0]);
} }
strlcpy(res, "ok", ressize); strlcpy(res, "ok", ressize);
} else if (msg->type == CMD_JAIL_REGEX_STATS) { } else if (msg->type == CMD_JAIL_FILTER_STATS) {
f2b_filter_stats(jail->filter, res, ressize); f2b_filter_stats(jail->filter, res, ressize);
} else if (msg->type == CMD_JAIL_REGEX_ADD) { } else if (msg->type == CMD_JAIL_FILTER_RELOAD) {
if (args[1] == NULL) { if (f2b_filter_reload(jail->filter)) {
strlcpy(res, "can't find regex: no args", ressize);
return;
}
if (f2b_filter_append(jail->filter, args[1])) {
strlcpy(res, "ok", ressize); strlcpy(res, "ok", ressize);
} else { } else {
strlcpy(res, f2b_filter_error(jail->filter), ressize); strlcpy(res, f2b_filter_error(jail->filter), ressize);

Loading…
Cancel
Save