summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 7eb89a00..8de5aa62 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -2435,6 +2435,9 @@ static int do_command_monitor(struct netlink_ctx *ctx, struct cmd *cmd)
.debug_mask = ctx->nft->debug_mask,
};
+ if (nft_output_json(&ctx->nft->output))
+ monhandler.format = NFTNL_OUTPUT_JSON;
+
monhandler.cache_needed = need_cache(cmd);
if (monhandler.cache_needed) {
struct rule *rule, *nrule;