Debian Codegraph @

tests/shell/testcases/listing/0021ruleset_json_terse_0

raw
1 #!/bin/bash
2
3 $NFT flush ruleset
4 $NFT add table ip test
5 $NFT add chain ip test c
6 $NFT add set ip test s { type ipv4_addr\; }
7 $NFT add element ip test s { 192.168.3.4, 192.168.3.5 }
8
9 if [ "$NFT_TEST_HAVE_json" != n ]; then
10 if $NFT -j -t list ruleset | grep '192\.168'
11 then
12 exit 1
13 fi
14 fi
15
16 if [ "$NFT_TEST_HAVE_json" = n ]; then
17 echo "Test partially skipped due to missing JSON support."
18 exit 77
19 fi