]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: ct: prefer normal cmp
authorFlorian Westphal <fw@strlen.de>
Thu, 3 Jun 2021 21:37:29 +0000 (23:37 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 7 Jun 2021 20:50:55 +0000 (22:50 +0200)
Followup patch will replace the { 1.2.3.4 } with single
cmp, so this will cause an error when the netlink dump gets
compared.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/py/inet/ct.t
tests/py/inet/ct.t.json
tests/py/inet/ct.t.payload

index 3d0dffad2819ad96044767c5491aa20720977ae6..5312b328aa9180ded59bca2c20445fcf75abefbe 100644 (file)
@@ -6,7 +6,7 @@
 meta nfproto ipv4 ct original saddr 1.2.3.4;ok;ct original ip saddr 1.2.3.4
 ct original ip6 saddr ::1;ok
 
-ct original ip daddr {1.2.3.4} accept;ok
+ct original ip daddr 1.2.3.4 accept;ok
 
 # missing protocol context
 ct original saddr ::1;fail
index e7f928ca10e4bd8381d4016937a01c13e2c4c5ad..223ac9e7575f9ccbf6c2a8fdc4b6c60cc05ab032 100644 (file)
@@ -39,7 +39,7 @@
     }
 ]
 
-# ct original ip daddr {1.2.3.4} accept
+# ct original ip daddr 1.2.3.4 accept
 [
     {
         "match": {
                 }
             },
             "op": "==",
-            "right": {
-                "set": [
-                    "1.2.3.4"
-                ]
-            }
+            "right": "1.2.3.4"
         }
     },
     {
index 3b274f8c64c4a837200082f1e1e79f1271b0b849..f7a2ef27274a3e201896da3252df2ab88b39adb3 100644 (file)
@@ -10,11 +10,8 @@ inet test-inet input
   [ ct load src_ip6 => reg 1 , dir original ]
   [ cmp eq reg 1 0x00000000 0x00000000 0x00000000 0x01000000 ]
 
-# ct original ip daddr {1.2.3.4} accept
-__set%d test-inet 3 size 1
-__set%d test-inet 0
-       element 04030201  : 0 [end]
+# ct original ip daddr 1.2.3.4 accept
 inet test-inet input
   [ ct load dst_ip => reg 1 , dir original ]
-  [ lookup reg 1 set __set%d ]
+  [ cmp eq reg 1 0x04030201 ]
   [ immediate reg 0 accept ]