summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-01-31 17:30:24 +0100
committerPhil Sutter <phil@nwl.cc>2024-01-31 18:00:44 +0100
commita4034c66b03e4d526fbad78da9cd38da9f1f43a5 (patch)
treed0c3a412ffe726b6ef07573c6e8b686fed33051f /src/parser_json.c
parent419c0199774c60ddf8b65f40c1ace8aac1c113d3 (diff)
json: Support sets' auto-merge option
If enabled, list the option as additional attribute with boolean value. Fixes: e70354f53e9f6 ("libnftables: Implement JSON output support") Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1734 Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index a0c9318c..970ae8cb 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -3369,6 +3369,7 @@ static struct cmd *json_parse_cmd_add_set(struct json_ctx *ctx, json_t *root,
if (!json_unpack(root, "{s:i}", "gc-interval", &set->gc_int))
set->gc_int *= 1000;
json_unpack(root, "{s:i}", "size", &set->desc.size);
+ json_unpack(root, "{s:b}", "auto-merge", &set->automerge);
if (!json_unpack(root, "{s:o}", "stmt", &stmt_json))
json_parse_set_stmt_list(ctx, &set->stmt_list, stmt_json);