summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÁlvaro Neira Ayuso <alvaroneay@gmail.com>2013-08-09 13:12:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-09 13:17:01 +0200
commitbd962f71467c68f73ea94e858ac599341716677c (patch)
tree5ddbceeaad6364af399cc0ecb7659ac327585b10
parent77d344a0c04f566a00140a11d9821848bad3b580 (diff)
src: expr: missing curly braces in json output support
Added missing curly braces in json output support. Signed-off-by: Alvaro Neira Ayuso Ayuso <alvaroneay@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/expr/bitwise.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/bitwise.c b/src/expr/bitwise.c
index f0a2eff..edc5a39 100644
--- a/src/expr/bitwise.c
+++ b/src/expr/bitwise.c
@@ -242,21 +242,21 @@ nft_rule_expr_bitwise_snprintf_json(char *buf, size_t size,
bitwise->sreg, bitwise->dreg);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- ret = snprintf(buf+offset, len, "\"mask\" : ");
+ ret = snprintf(buf+offset, len, "\"mask\" : {");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
ret = nft_data_reg_snprintf(buf+offset, len, &bitwise->mask,
NFT_RULE_O_JSON, 0, DATA_VALUE);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- ret = snprintf(buf+offset, len, ", \"xor\" : ");
+ ret = snprintf(buf+offset, len, "}, \"xor\" : {");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
ret = nft_data_reg_snprintf(buf+offset, len, &bitwise->xor,
NFT_RULE_O_JSON, 0, DATA_VALUE);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
- ret = snprintf(buf+offset, len, "\"");
+ ret = snprintf(buf+offset, len, "}");
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
return offset;