|
|
|
@ -53,8 +53,8 @@ struct f2b_cmd_t {
|
|
|
|
|
.tokens = { "jail", "<jailname>", "set", "<param>", "<value>", NULL }, |
|
|
|
|
.help = "Set parameter of given jail", |
|
|
|
|
}, |
|
|
|
|
[CMD_JAIL_IP_STATUS] = { |
|
|
|
|
.tokens = { "jail", "<jailname>", "status", "<ip>", NULL }, |
|
|
|
|
[CMD_JAIL_IP_SHOW] = { |
|
|
|
|
.tokens = { "jail", "<jailname>", "show", "<ip>", NULL }, |
|
|
|
|
.help = "Show ip status in given jail", |
|
|
|
|
}, |
|
|
|
|
[CMD_JAIL_IP_BAN] = { |
|
|
|
@ -151,10 +151,10 @@ f2b_cmd_parse(const char *src, char *buf, size_t buflen) {
|
|
|
|
|
strlcat(buf, "\n", buflen); |
|
|
|
|
return CMD_JAIL_SET; |
|
|
|
|
} |
|
|
|
|
if (tokenc == 4 && strcmp(tokens[2], "status") == 0) { |
|
|
|
|
if (tokenc == 4 && strcmp(tokens[2], "show") == 0) { |
|
|
|
|
strlcat(buf, tokens[3], buflen); |
|
|
|
|
strlcat(buf, "\n", buflen); |
|
|
|
|
return CMD_JAIL_IP_STATUS; |
|
|
|
|
return CMD_JAIL_IP_SHOW; |
|
|
|
|
} |
|
|
|
|
if (tokenc == 4 && strcmp(tokens[2], "ban") == 0) { |
|
|
|
|
strlcat(buf, tokens[3], buflen); |
|
|
|
|