summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorGopal Yadav <gopunop@gmail.com>2020-09-22 13:55:33 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2020-09-22 23:26:18 +0200
commitf02aa3764a48c2afd17761a211f70da941c71d00 (patch)
treeeebe5a578a3aa3c11cd6f7403bc9b1aede9f69a5 /tests/shell/testcases
parentae1d822630e6dcbac2650a90b2004360d7a51e48 (diff)
json: Combining --terse with --json has no effect
--terse with --json is ignored, fix this. This patch also includes a test. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1388 Signed-off-by: Gopal Yadav <gopunop@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-xtests/shell/testcases/listing/0021ruleset_json_terse_012
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/testcases/listing/0021ruleset_json_terse_0 b/tests/shell/testcases/listing/0021ruleset_json_terse_0
new file mode 100755
index 00000000..c739ac3f
--- /dev/null
+++ b/tests/shell/testcases/listing/0021ruleset_json_terse_0
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+$NFT flush ruleset
+$NFT add table ip test
+$NFT add chain ip test c
+$NFT add set ip test s { type ipv4_addr\; }
+$NFT add element ip test s { 192.168.3.4, 192.168.3.5 }
+
+if $NFT -j -t list ruleset | grep '192'
+then
+ exit 1
+fi