summaryrefslogtreecommitdiffstats
path: root/tests/py/ip6/meta.t.payload
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-07-06 10:26:39 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-07-06 16:51:58 +0200
commit25e7b99cc450490c38becb03d8bddd0199cfd3f9 (patch)
treed70bca5651734c8626e3fba0eb11377ad53847ff /tests/py/ip6/meta.t.payload
parent0fe1d450c7a7d45cf5c011dd3c6dc0878a2210d2 (diff)
netlink_linearize: use div_round_up in byteorder length
Use div_round_up() to calculate the byteorder length, otherwise fields that take % BITS_PER_BYTE != 0 are not considered by the byteorder expression. Reported-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6/meta.t.payload')
-rw-r--r--tests/py/ip6/meta.t.payload4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/py/ip6/meta.t.payload b/tests/py/ip6/meta.t.payload
index f0507dc4..379a9c13 100644
--- a/tests/py/ip6/meta.t.payload
+++ b/tests/py/ip6/meta.t.payload
@@ -66,7 +66,7 @@ ip6 test-ip6 input
[ payload load 2b @ network header + 0 => reg 1 ]
[ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
[ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
- [ byteorder reg 1 = ntoh(reg 1, 2, 1) ]
+ [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
[ bitwise reg 1 = ( reg 1 << 0x00000002 ) ]
[ bitwise reg 1 = ( reg 1 & 0xffffffef ) ^ 0x00000010 ]
[ meta set mark with reg 1 ]
@@ -76,7 +76,7 @@ ip6 test-ip6 input
[ payload load 2b @ network header + 0 => reg 1 ]
[ bitwise reg 1 = ( reg 1 & 0x0000c00f ) ^ 0x00000000 ]
[ bitwise reg 1 = ( reg 1 >> 0x00000006 ) ]
- [ byteorder reg 1 = ntoh(reg 1, 2, 1) ]
+ [ byteorder reg 1 = ntoh(reg 1, 2, 2) ]
[ bitwise reg 1 = ( reg 1 << 0x0000001a ) ]
[ bitwise reg 1 = ( reg 1 & 0xffffffef ) ^ 0x00000010 ]
[ meta set mark with reg 1 ]