From eb071c0c8fea0d8472e586dcdfa46adb907911a9 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 21 Apr 2016 16:45:31 +1000 Subject: [PATCH] * f2b_cmsg_process() : fix logic --- src/daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon.c b/src/daemon.c index 8ce8047..81c03a5 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -95,7 +95,7 @@ f2b_cmsg_process(const f2b_cmsg_t *msg, char *res, size_t ressize) { memset(args, 0x0, sizeof(args)); f2b_cmsg_extract_args(msg, args); - if (msg->type >= CMD_JAIL_STATUS || msg->type <= CMD_JAIL_IP_RELEASE) { + if (msg->type >= CMD_JAIL_STATUS && msg->type <= CMD_JAIL_IP_RELEASE) { if (args[0] == NULL) { strlcpy(res, "can't find jail: no args\n", ressize); return; @@ -106,7 +106,7 @@ f2b_cmsg_process(const f2b_cmsg_t *msg, char *res, size_t ressize) { } } - if (jail && (msg->type >= CMD_JAIL_IP_SHOW || msg->type <= CMD_JAIL_IP_RELEASE)) { + if (jail && (msg->type >= CMD_JAIL_IP_SHOW && msg->type <= CMD_JAIL_IP_RELEASE)) { if (args[1] == NULL) { strlcpy(res, "can't find ip: no args", ressize); return;