]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: fix up two broken json test cases
authorFlorian Westphal <fw@strlen.de>
Tue, 16 Jul 2019 19:40:27 +0000 (21:40 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 17 Jul 2019 08:08:51 +0000 (10:08 +0200)
Forgot to add a json test case for the recently added ct ip addr in map case.
Fix up rawpayload.t for json, it needs to expect new "th dport" when
listing.

Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/py/any/rawpayload.t.json.output
tests/py/inet/ct.t.json

index a234e99a00b189cdf77a04185d798252032b601e..ccadbc57ce096991a6c87a794a97092a82a53d84 100644 (file)
@@ -19,9 +19,8 @@
         "match": {
             "left": {
                 "payload": {
-                    "base": "th",
-                    "len": 16,
-                    "offset": 16
+                    "field": "dport",
+                    "protocol": "th"
                 }
             },
            "op": "==",
index d0c26aef933306489a9deffa7b60aae77986a176..e7f928ca10e4bd8381d4016937a01c13e2c4c5ad 100644 (file)
     }
 ]
 
+# ct original ip daddr {1.2.3.4} accept
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "dir": "original",
+                    "key": "ip daddr"
+                }
+            },
+            "op": "==",
+            "right": {
+                "set": [
+                    "1.2.3.4"
+                ]
+            }
+        }
+    },
+    {
+        "accept": null
+    }
+]
+