summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2015-12-07 14:12:20 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-05-11 23:01:31 +0200
commit56e2128650b592792efdc3a4a9c4b3952eab83d0 (patch)
tree9b9c73a9c67e394efe54dee8024de7563bae8f1c /tests/py/ip6
parent0c9796c2f6bbd8ff359d2558dd2e4035f1b794bd (diff)
proto: update IPv6 flowlabel offset and length according to RFC2460
This is a 20 bit field according to Section 3. IPv6 Header Format. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6')
-rw-r--r--tests/py/ip6/ip6.t.payload.inet4
-rw-r--r--tests/py/ip6/ip6.t.payload.ip64
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/py/ip6/ip6.t.payload.inet b/tests/py/ip6/ip6.t.payload.inet
index 4d2ea352..3d0ae396 100644
--- a/tests/py/ip6/ip6.t.payload.inet
+++ b/tests/py/ip6/ip6.t.payload.inet
@@ -3,6 +3,7 @@ inet test-inet input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x0000000a ]
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ cmp eq reg 1 0x00160000 ]
# ip6 flowlabel != 233
@@ -10,6 +11,7 @@ inet test-inet input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x0000000a ]
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ cmp neq reg 1 0x00e90000 ]
# ip6 flowlabel { 33, 55, 67, 88}
@@ -20,6 +22,7 @@ inet test-inet input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x0000000a ]
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ lookup reg 1 set set%d ]
# ip6 flowlabel { 33-55}
@@ -30,6 +33,7 @@ inet test-inet input
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x0000000a ]
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ lookup reg 1 set set%d ]
# ip6 length 22
diff --git a/tests/py/ip6/ip6.t.payload.ip6 b/tests/py/ip6/ip6.t.payload.ip6
index db59bfbe..55286ee8 100644
--- a/tests/py/ip6/ip6.t.payload.ip6
+++ b/tests/py/ip6/ip6.t.payload.ip6
@@ -1,11 +1,13 @@
# ip6 flowlabel 22
ip6 test-ip6 input
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ cmp eq reg 1 0x00160000 ]
# ip6 flowlabel != 233
ip6 test-ip6 input
[ payload load 3b @ network header + 1 => reg 1 ]
+ [ bitwise reg 1 = (reg=1 & 0x00ffff0f ) ^ 0x00000000 ]
[ cmp neq reg 1 0x00e90000 ]
# ip6 flowlabel { 33, 55, 67, 88}
@@ -14,6 +16,7 @@ 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 ]
# ip6 flowlabel { 33-55}
@@ -22,6 +25,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 ]
# ip6 length 22