summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-05-28 18:51:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-06-01 09:16:48 +0200
commitc34637ea8be9e88fa76aedab4a5244c04f43a6ea (patch)
tree7c7b4a791729ebbdd396722ced96a01c717054b2
parent984c3657343c5a0d2d75f55ff94fad218569fae0 (diff)
tests/py: Add missing JSON equivalent for inet/sets.t
This adds the missing JSON variant for the two rules which are supposed to work. Fixes: 2efbdf7b8fcf7 ("tests: py: allow to specify sets with a timeout") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--tests/py/inet/sets.t.json37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/py/inet/sets.t.json b/tests/py/inet/sets.t.json
new file mode 100644
index 00000000..75881f71
--- /dev/null
+++ b/tests/py/inet/sets.t.json
@@ -0,0 +1,37 @@
+# ip saddr @set1 drop
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "saddr",
+ "name": "ip"
+ }
+ },
+ "right": "@set1"
+ }
+ },
+ {
+ "drop": null
+ }
+]
+
+# ip6 daddr != @set2 accept
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "daddr",
+ "name": "ip6"
+ }
+ },
+ "op": "!=",
+ "right": "@set2"
+ }
+ },
+ {
+ "accept": null
+ }
+]
+