]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/py: Fix JSON expected output for icmpv6 code values
authorPhil Sutter <phil@nwl.cc>
Thu, 9 May 2019 11:35:45 +0000 (13:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 9 May 2019 15:19:50 +0000 (17:19 +0200)
Reverse translation is happening for values which are known, even if
they are part of a range. In contrast to standard output, this is OK
because in JSON lower and upper bounds are properties and there is no
ambiguity if names contain a dash.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/ip6/icmpv6.t.json.output

index 17032a03d80bd66c825566480e688457ed1ce7d4..3a1066211f56be258fe423040b4f09d80f79bb57 100644 (file)
     }
 ]
 
+# icmpv6 code 3-66
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "code",
+                    "protocol": "icmpv6"
+                }
+            },
+           "op": "==",
+            "right": {
+                "range": [ "addr-unreachable", 66 ]
+            }
+        }
+    }
+]
+
 # icmpv6 code {5, 6, 7} accept
 [
     {
         "accept": null
     }
 ]
+
+# icmpv6 code { 3-66}
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "code",
+                    "protocol": "icmpv6"
+                }
+            },
+           "op": "==",
+            "right": {
+                "set": [
+                    { "range": [ "addr-unreachable", 66 ] }
+                ]
+            }
+        }
+    }
+]
+
+# icmpv6 code != { 3-66}
+[
+    {
+        "match": {
+            "left": {
+                "payload": {
+                    "field": "code",
+                    "protocol": "icmpv6"
+                }
+            },
+            "op": "!=",
+            "right": {
+                "set": [
+                    { "range": [ "addr-unreachable", 66 ] }
+                ]
+            }
+        }
+    }
+]
+