summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/ip6.t.payload.ip6
diff options
context:
space:
mode:
authorAnatole Denis <anatole@rezel.net>2016-11-24 15:16:21 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-11-29 22:49:06 +0100
commit3883104bc3892dcc0a094804b3add83e0a08d68d (patch)
tree7e16b83e2198e2643e2d50ac258ae3b94137b27e /tests/py/ip6/ip6.t.payload.ip6
parentcc7b37d18a687d53e8724b3104b042e6767a9cef (diff)
tests/py: Unmask negative set lookup
Many testcases were masked because of bug #888. This series of patches unmasks them Signed-off-by: Anatole Denis <anatole@rezel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6/ip6.t.payload.ip6')
-rw-r--r--tests/py/ip6/ip6.t.payload.ip682
1 files changed, 82 insertions, 0 deletions
diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6
index 56ed8bd4..74d06b3e 100644
--- a/tests/py/ip6/ip6.t.payload.ip6
+++ b/tests/py/ip6/ip6.t.payload.ip6
@@ -52,6 +52,15 @@ ip6 test-ip6 input
[ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ lookup reg 1 set __set%d ]
+# ip6 flowlabel != { 33, 55, 67, 88}
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 00210000 : 0 [end] element 00370000 : 0 [end] element 00430000 : 0 [end] element 00580000 : 0 [end]
+ip6 test-ip6 input
+ [ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 flowlabel { 33-55}
__set%d test-ip6 7
__set%d test-ip6 0
@@ -61,6 +70,15 @@ ip6 test-ip6 input
[ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ lookup reg 1 set __set%d ]
+# ip6 flowlabel != { 33-55}
+__set%d test-ip6 7
+__set%d test-ip6 0
+ element 00000000 : 1 [end] element 00210000 : 0 [end] element 00380000 : 1 [end]
+ip6 test-ip6 input
+ [ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 length 22
ip6 test-ip6 input
[ payload load 2b @ network header + 4 => reg 1 ]
@@ -82,6 +100,22 @@ ip6 test-ip6 input
[ payload load 2b @ network header + 4 => reg 1 ]
[ range neq reg 1 0x00002100 0x00002d00 ]
+# ip6 length { 33, 55, 67, 88}
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 00002100 : 0 [end] element 00003700 : 0 [end] element 00004300 : 0 [end] element 00005800 : 0 [end]
+ip6 test-ip6 input
+ [ payload load 2b @ network header + 4 => reg 1 ]
+ [ lookup reg 1 set __set%d ]
+
+# ip6 length != {33, 55, 67, 88}
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 00002100 : 0 [end] element 00003700 : 0 [end] element 00004300 : 0 [end] element 00005800 : 0 [end]
+ip6 test-ip6 input
+ [ payload load 2b @ network header + 4 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 length { 33-55}
__set%d test-ip6 7
__set%d test-ip6 0
@@ -90,6 +124,14 @@ ip6 test-ip6 input
[ payload load 2b @ network header + 4 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# ip6 length != { 33-55}
+__set%d test-ip6 7
+__set%d test-ip6 0
+ element 00000000 : 1 [end] element 00002100 : 0 [end] element 00003800 : 1 [end]
+ip6 test-ip6 input
+ [ payload load 2b @ network header + 4 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 nexthdr {udp, ah, comp, udplite, tcp, dccp, sctp}
__set%d test-ip6 3
__set%d test-ip6 0
@@ -106,6 +148,14 @@ ip6 test-ip6 input
[ payload load 1b @ network header + 6 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# ip6 nexthdr != {esp, ah, comp, udp, udplite, tcp, dccp, sctp, icmpv6}
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 00000032 : 0 [end] element 00000033 : 0 [end] element 0000006c : 0 [end] element 00000011 : 0 [end] element 00000088 : 0 [end] element 00000006 : 0 [end] element 00000021 : 0 [end] element 00000084 : 0 [end] element 0000003a : 0 [end]
+ip6 test-ip6 input
+ [ payload load 1b @ network header + 6 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 nexthdr esp
ip6 test-ip6 input
[ payload load 1b @ network header + 6 => reg 1 ]
@@ -124,6 +174,14 @@ ip6 test-ip6 input
[ payload load 1b @ network header + 6 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# ip6 nexthdr != { 33-44}
+__set%d test-ip6 7
+__set%d test-ip6 0
+ element 00000000 : 1 [end] element 00000021 : 0 [end] element 0000002d : 1 [end]
+ip6 test-ip6 input
+ [ payload load 1b @ network header + 6 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 nexthdr 33-44
ip6 test-ip6 input
[ payload load 1b @ network header + 6 => reg 1 ]
@@ -164,6 +222,14 @@ ip6 test-ip6 input
[ payload load 1b @ network header + 7 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# ip6 hoplimit != {33, 55, 67, 88}
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 00000021 : 0 [end] element 00000037 : 0 [end] element 00000043 : 0 [end] element 00000058 : 0 [end]
+ip6 test-ip6 input
+ [ payload load 1b @ network header + 7 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 hoplimit {33-55}
__set%d test-ip6 7
__set%d test-ip6 0
@@ -172,6 +238,14 @@ ip6 test-ip6 input
[ payload load 1b @ network header + 7 => reg 1 ]
[ lookup reg 1 set __set%d ]
+# ip6 hoplimit != {33-55}
+__set%d test-ip6 7
+__set%d test-ip6 0
+ element 00000000 : 1 [end] element 00000021 : 0 [end] element 00000038 : 1 [end]
+ip6 test-ip6 input
+ [ payload load 1b @ network header + 7 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 saddr 1234:1234:1234:1234:1234:1234:1234:1234
ip6 test-ip6 input
[ payload load 16b @ network header + 8 => reg 1 ]
@@ -370,6 +444,14 @@ ip6 test-ip6 input
[ payload load 16b @ network header + 24 => reg 1 ]
[ cmp eq reg 1 0x00000000 0x00000000 0x00000000 0x02000000 ]
+# ip6 daddr != {::1234:1234:1234:1234:1234:1234:1234, 1234:1234::1234:1234:1234:1234:1234 }
+__set%d test-ip6 3
+__set%d test-ip6 0
+ element 34120000 34123412 34123412 34123412 : 0 [end] element 34123412 34120000 34123412 34123412 : 0 [end]
+ip6 test-ip6 input
+ [ payload load 16b @ network header + 24 => reg 1 ]
+ [ lookup reg 1 set __set%d 0x1 ]
+
# ip6 daddr != ::1234:1234:1234:1234:1234:1234:1234-1234:1234::1234:1234:1234:1234:1234
ip6 test-ip6 input
[ payload load 16b @ network header + 24 => reg 1 ]