diff options
author | Phil Sutter <phil@nwl.cc> | 2024-01-31 17:30:24 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-01-31 18:00:44 +0100 |
commit | a4034c66b03e4d526fbad78da9cd38da9f1f43a5 (patch) | |
tree | d0c3a412ffe726b6ef07573c6e8b686fed33051f /src/json.c | |
parent | 419c0199774c60ddf8b65f40c1ace8aac1c113d3 (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/json.c')
-rw-r--r-- | src/json.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -194,6 +194,8 @@ static json_t *set_print_json(struct output_ctx *octx, const struct set *set) tmp = json_pack("i", set->gc_int / 1000); json_object_set_new(root, "gc-interval", tmp); } + if (set->automerge) + json_object_set_new(root, "auto-merge", json_true()); if (!nft_output_terse(octx) && set->init && set->init->size > 0) { json_t *array = json_array(); |