summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-02-02 19:47:46 +0100
committerPhil Sutter <phil@nwl.cc>2021-02-03 11:31:30 +0100
commita02ef54d9c4fa82c10d199d027f42f136b1bddc3 (patch)
tree9e57330dd888d6a78cacc67083f6f8626c49e697 /src
parent533565244d88a818d8828ebabd7625e5a8a4c374 (diff)
json: Do not abbreviate reject statement object
No need to reduce output size, also this way output is more predictable. While being at it, drop some pointless chunks from tests/py/bridge/reject.t.json.output. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src')
-rw-r--r--src/json.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/json.c b/src/json.c
index 83717141..0ccbbe8a 100644
--- a/src/json.c
+++ b/src/json.c
@@ -1380,24 +1380,16 @@ json_t *reject_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
type = "tcp reset";
break;
case NFT_REJECT_ICMPX_UNREACH:
- if (stmt->reject.icmp_code == NFT_REJECT_ICMPX_PORT_UNREACH)
- break;
type = "icmpx";
jexpr = expr_print_json(stmt->reject.expr, octx);
break;
case NFT_REJECT_ICMP_UNREACH:
switch (stmt->reject.family) {
case NFPROTO_IPV4:
- if (!stmt->reject.verbose_print &&
- stmt->reject.icmp_code == ICMP_PORT_UNREACH)
- break;
type = "icmp";
jexpr = expr_print_json(stmt->reject.expr, octx);
break;
case NFPROTO_IPV6:
- if (!stmt->reject.verbose_print &&
- stmt->reject.icmp_code == ICMP6_DST_UNREACH_NOPORT)
- break;
type = "icmpv6";
jexpr = expr_print_json(stmt->reject.expr, octx);
break;