]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: Fix tests added for 'icmpv6 taddr' support
authorPhil Sutter <phil@nwl.cc>
Wed, 13 Aug 2025 14:14:08 +0000 (16:14 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 18 Aug 2025 20:57:24 +0000 (22:57 +0200)
There was a duplicate test, also stored JSON equivalents should match
input as much as possible. The expected deviation in output (just like
with standard syntax) is stored in the .json.output file instead.

Fixes: 2e86f45d0260a ("icmpv6: Allow matching target address in NS/NA, redirect and MLD")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/ip6/icmpv6.t
tests/py/ip6/icmpv6.t.json
tests/py/ip6/icmpv6.t.json.output

index 7632bfd878f4714d1a84becfe4b5cf196a196038..5108b427a60a5e0820c4e16ab4711fddb9a6871f 100644 (file)
@@ -91,8 +91,6 @@ icmpv6 type nd-neighbor-solicit icmpv6 taddr 2001:db8::133;ok
 icmpv6 type nd-neighbor-advert icmpv6 taddr 2001:db8::133;ok
 icmpv6 taddr 2001:db8::133;ok;icmpv6 type { mld-listener-query, mld-listener-report, mld-listener-done, nd-neighbor-solicit, nd-neighbor-advert, nd-redirect} icmpv6 taddr 2001:db8::133
 
-icmpv6 taddr 2001:db8::133;ok;icmpv6 type { mld-listener-query, mld-listener-report, mld-listener-done, nd-neighbor-solicit, nd-neighbor-advert, nd-redirect} icmpv6 taddr 2001:db8::133
-
 icmpv6 type { mld-listener-query, mld-listener-report, mld-listener-done, nd-neighbor-solicit, nd-neighbor-advert, nd-redirect} icmpv6 taddr 2001:db8::133;ok
 icmpv6 type { nd-neighbor-solicit, nd-neighbor-advert } icmpv6 taddr 2001:db8::133;ok
 icmpv6 daddr 2001:db8::133;ok
index 9df886dd2277261f0fd0d61bbcf6e34f627938ed..5c36aabaaaee56d4cf96adca2c1e20ffeb2eaba8 100644 (file)
 
 # icmpv6 taddr 2001:db8::133
 [
-    {
-        "match": {
-            "left": {
-                "payload": {
-                    "field": "type",
-                    "protocol": "icmpv6"
-                }
-            },
-            "op": "==",
-            "right": {
-                "set": [
-                    "mld-listener-query",
-                    "mld-listener-report",
-                    "mld-listener-done",
-                    "nd-neighbor-solicit",
-                    "nd-neighbor-advert",
-                    "nd-redirect"
-                ]
-            }
-        }
-    },
-    {
-        "match": {
-            "left": {
-                "payload": {
-                    "field": "taddr",
-                    "protocol": "icmpv6"
-                }
-            },
-            "op": "==",
-            "right": "2001:db8::133"
-        }
-    }
-]
-
-# icmpv6 taddr 2001:db8::133
-[
-    {
-        "match": {
-            "left": {
-                "payload": {
-                    "field": "type",
-                    "protocol": "icmpv6"
-                }
-            },
-            "op": "==",
-            "right": {
-                "set": [
-                    "mld-listener-query",
-                    "mld-listener-report",
-                    "mld-listener-done",
-                    "nd-neighbor-solicit",
-                    "nd-neighbor-advert",
-                    "nd-redirect"
-                ]
-            }
-        }
-    },
     {
         "match": {
             "left": {
index 5d33780ee82bac660f568276fa81d79586274384..568bdb533910a48d47cfde08a8fa8fbeaa092329 100644 (file)
     }
 ]
 
+# icmpv6 taddr 2001:db8::133
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "type",
+                    "protocol": "icmpv6"
+                }
+            },
+            "op": "==",
+            "right": {
+                "set": [
+                    "mld-listener-query",
+                    "mld-listener-report",
+                    "mld-listener-done",
+                    "nd-neighbor-solicit",
+                    "nd-neighbor-advert",
+                    "nd-redirect"
+                ]
+            }
+        }
+    },
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "taddr",
+                    "protocol": "icmpv6"
+                }
+            },
+            "op": "==",
+            "right": "2001:db8::133"
+        }
+    }
+]