summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 12:11:09 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-10-29 15:07:35 +0100
commit48636e1fe6f6d3141de735f9faf4c359938b837c (patch)
tree261623cb4aa26de34f1432fd2b6964f9a57ae789 /src/parser_json.c
parent7a6f12d75034fed940ce635e76a13123430f088e (diff)
src: add nft_ctx_output_{get,set}_echo() to nft_ctx_output_{get,set}_flags
Add NFT_CTX_OUTPUT_ECHO flag and echo the command that has been send to the kernel. Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index bc682e92..412f5cf2 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -3399,7 +3399,7 @@ int nft_parse_json_buffer(struct nft_ctx *nft, const char *buf,
ret = __json_parse(&ctx);
- if (!nft->output.echo) {
+ if (!nft_output_echo(&nft->output)) {
json_decref(nft->json_root);
nft->json_root = NULL;
}
@@ -3427,7 +3427,7 @@ int nft_parse_json_filename(struct nft_ctx *nft, const char *filename,
ret = __json_parse(&ctx);
- if (!nft->output.echo) {
+ if (!nft_output_echo(&nft->output)) {
json_decref(nft->json_root);
nft->json_root = NULL;
}