]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/py: Add missing JSON equivalent for inet/sets.t
authorPhil Sutter <phil@nwl.cc>
Mon, 28 May 2018 16:51:08 +0000 (18:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 07:16:48 +0000 (09:16 +0200)
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>
tests/py/inet/sets.t.json [new file with mode: 0644]

diff --git a/tests/py/inet/sets.t.json b/tests/py/inet/sets.t.json
new file mode 100644 (file)
index 0000000..75881f7
--- /dev/null
@@ -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
+    }
+]
+