diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-10-11 10:14:33 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-17 14:01:48 +0200 |
commit | c628d663acfab40fb380aea3247177b53fea2626 (patch) | |
tree | 842f32dc1d91f569f3fcb69597e273aa14340d76 /tests/shell/testcases | |
parent | d11ef6ed2ac29fcd0e7ceccc72298d53f40d8c28 (diff) |
tests: shell: Add test case for sets.
This patch adds test case for anonymous sets.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-x | tests/shell/testcases/sets/0025anonymous_set_0 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0025anonymous_set_0 b/tests/shell/testcases/sets/0025anonymous_set_0 new file mode 100755 index 00000000..93a7c022 --- /dev/null +++ b/tests/shell/testcases/sets/0025anonymous_set_0 @@ -0,0 +1,17 @@ +#!/bin/bash + +# Adding anonymous sets + +set -e + +$NFT add table t +$NFT add chain t c { type filter hook output priority 0 \; } +# set: IP addresses +$NFT add rule t c ip daddr { \ + 192.168.0.1, \ + 192.168.0.2, \ + 192.168.0.3, \ +} + +#set : tcp ports +$NFT add rule t c tcp dport { 22, 23 } counter |