]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: parser: fix parsing of chain priority and policy on bigendian
authorFlorian Westphal <fw@strlen.de>
Tue, 13 Aug 2019 20:12:45 +0000 (22:12 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 14 Aug 2019 09:48:03 +0000 (11:48 +0200)
commit015b752465518e072d60f53cf89f8cf4b107d639
tree1206699f8653705eba8775eeddc8014533dd2a51
parentfb6d826afb1fa346bdf61c43cd6f7551caee27ba
src: parser: fix parsing of chain priority and policy on bigendian

tests/shell/testcases/flowtable/0001flowtable_0
tests/shell/testcases/nft-f/0008split_tables_0
fail the 'dump compare' on s390x.
The priority (10) turns to 0, and accept turned to drop.

Problem is that '$1' is a 64bit value -- then we pass the address
and import 'int' -- we then get the upper all zero bits.

Add a 32bit interger type and use that.

v2: add uint32_t type to union, v1 used temporary value instead.

Fixes: 627c451b2351 ("src: allow variables in the chain priority specification")
Fixes: dba4a9b4b5fe ("src: allow variable in chain policy")
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y