From 7a6f12d75034fed940ce635e76a13123430f088e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 27 Oct 2018 12:02:02 +0200 Subject: src: add nft_ctx_output_{get,set}_json() to nft_ctx_output_{get,set}_flags Add NFT_CTX_OUTPUT_JSON flag and display output in json format. Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index da1bdc44..86b68cb8 100644 --- a/src/rule.c +++ b/src/rule.c @@ -2127,7 +2127,7 @@ static int do_command_list(struct netlink_ctx *ctx, struct cmd *cmd) { struct table *table = NULL; - if (ctx->nft->output.json) + if (nft_output_json(&ctx->nft->output)) return do_command_list_json(ctx, cmd); if (cmd->handle.table.name != NULL) -- cgit v1.2.3