summaryrefslogtreecommitdiffstats
path: root/lib/ipset.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipset.c')
-rw-r--r--lib/ipset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ipset.c b/lib/ipset.c
index 8e63af5..c910d88 100644
--- a/lib/ipset.c
+++ b/lib/ipset.c
@@ -235,7 +235,7 @@ const struct ipset_envopts ipset_envopts[] = {
{ .name = { "-o", "-output" },
.has_arg = IPSET_MANDATORY_ARG, .flag = IPSET_OPT_MAX,
.parse = ipset_parse_output,
- .help = "plain|save|xml\n"
+ .help = "plain|save|xml|json\n"
" Specify output mode for listing sets.\n"
" Default value for \"list\" command is mode \"plain\"\n"
" and for \"save\" command is mode \"save\".",
@@ -429,6 +429,8 @@ ipset_parse_output(struct ipset *ipset,
return ipset_session_output(session, IPSET_LIST_PLAIN);
else if (STREQ(str, "xml"))
return ipset_session_output(session, IPSET_LIST_XML);
+ else if (STREQ(str, "json"))
+ return ipset_session_output(session, IPSET_LIST_JSON);
else if (STREQ(str, "save"))
return ipset_session_output(session, IPSET_LIST_SAVE);