|
|
@ -130,11 +130,7 @@ f2b_cmsg_process(const f2b_cmsg_t *msg, char *res, size_t ressize) { |
|
|
|
} else if (msg->type == CMD_JAIL_STATUS) { |
|
|
|
} else if (msg->type == CMD_JAIL_STATUS) { |
|
|
|
f2b_jail_cmd_status(res, ressize, args[0]); |
|
|
|
f2b_jail_cmd_status(res, ressize, args[0]); |
|
|
|
} else if (msg->type == CMD_JAIL_IP_STATUS) { |
|
|
|
} else if (msg->type == CMD_JAIL_IP_STATUS) { |
|
|
|
if ((addr = f2b_addrlist_lookup(jail->ipaddrs, args[1])) != NULL) { |
|
|
|
f2b_jail_cmd_ip_status(res, ressize, args[0], args[1]); |
|
|
|
f2b_ipaddr_status(addr, res, ressize); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
snprintf(res, ressize, "can't find ip '%s' in jail '%s'\n", args[1], args[0]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (msg->type == CMD_JAIL_IP_BAN) { |
|
|
|
} else if (msg->type == CMD_JAIL_IP_BAN) { |
|
|
|
if ((addr = f2b_addrlist_lookup(jail->ipaddrs, args[1])) == NULL) { |
|
|
|
if ((addr = f2b_addrlist_lookup(jail->ipaddrs, args[1])) == NULL) { |
|
|
|
/* TODO: this is copy-paste from f2b_jail_process */ |
|
|
|
/* TODO: this is copy-paste from f2b_jail_process */ |
|
|
|