From 5ee661248aa3cf710f88f583129bced658e568d3 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Tue, 20 Sep 2016 22:52:32 +1000 Subject: [PATCH] * daemon.c : update f2b_cmsg_process() --- src/daemon.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/daemon.c b/src/daemon.c index a1e8e72..9ff1c59 100644 --- a/src/daemon.c +++ b/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]); } 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); - } else if (msg->type == CMD_JAIL_REGEX_ADD) { - if (args[1] == NULL) { - strlcpy(res, "can't find regex: no args", ressize); - return; - } - if (f2b_filter_append(jail->filter, args[1])) { + } else if (msg->type == CMD_JAIL_FILTER_RELOAD) { + if (f2b_filter_reload(jail->filter)) { strlcpy(res, "ok", ressize); } else { strlcpy(res, f2b_filter_error(jail->filter), ressize);