diff options
author | Florian Westphal <fw@strlen.de> | 2017-01-16 14:24:31 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2017-01-16 22:17:46 +0100 |
commit | ddf495af821cbe41d3fada9979bb8e54d0c79cea (patch) | |
tree | 4b896338f109ef857c43f028d037a5187ccffd33 /tests/py/ip6/dup.t.payload | |
parent | c5a3c8918330f3b5af883ee5b071989e8917177b (diff) |
evaluate: fix export length and data corruption
Pablo reported that ipv6 tests would fail on some systems:
WARNING: 'add rule --debug=netlink ip6 test-ip6 input ip6 flowlabel set 0':
'[ bitwise reg 1 = (reg=1 & 0x000000f0 ) ^ 0x00000000 ]' mismatches
'[ bitwise reg 1 = (reg=1 & 0x00000000 ) ^ 0x00000000 ]'
^ should be 'f'
Problem is that mpz_export_data expects the size of the output
buffer in bytes, but this gave bit-based size.
Then, when mpz_export_data clears the output buffer it will
also clear 8 extra bytes on stack; depending on compiler version (stack
layout) this will then clear the bitmask value that we want to export.
Fixes: 78936d50f306c ("evaluate: add support to set IPv6 non-byte header fields")
Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Tested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip6/dup.t.payload')
0 files changed, 0 insertions, 0 deletions