summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-05-09 13:35:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-09 17:19:50 +0200
commitc4b806660d047281679b7a66390b5d5829e45a87 (patch)
tree7a2e0a2fb706d7ce91b47960bf6644173e2a7373 /tests/py
parent6ee08a4d50a56bf786ade1188b63338d550d7e99 (diff)
tests/py: Fix JSON expected output for icmpv6 code values
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>
Diffstat (limited to 'tests/py')
-rw-r--r--tests/py/ip6/icmpv6.t.json.output59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/py/ip6/icmpv6.t.json.output b/tests/py/ip6/icmpv6.t.json.output
index 17032a03..3a106621 100644
--- a/tests/py/ip6/icmpv6.t.json.output
+++ b/tests/py/ip6/icmpv6.t.json.output
@@ -109,6 +109,24 @@
}
]
+# icmpv6 code 3-66
+[
+ {
+ "match": {
+ "left": {
+ "payload": {
+ "field": "code",
+ "protocol": "icmpv6"
+ }
+ },
+ "op": "==",
+ "right": {
+ "range": [ "addr-unreachable", 66 ]
+ }
+ }
+ }
+]
+
# icmpv6 code {5, 6, 7} accept
[
{
@@ -133,3 +151,44 @@
"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 ] }
+ ]
+ }
+ }
+ }
+]
+