summaryrefslogtreecommitdiffstats
path: root/src/netlink_linearize.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-08-13 22:12:44 +0200
committerFlorian Westphal <fw@strlen.de>2019-08-14 11:47:58 +0200
commitfb6d826afb1fa346bdf61c43cd6f7551caee27ba (patch)
tree88106f4a22c5d078727aad7b79fb73c2aa58d662 /src/netlink_linearize.c
parent463811e9681188813264f572aca230273ccd1375 (diff)
src: fix jumps on bigendian arches
table bla { chain foo { } chain bar { jump foo } } } Fails to restore on big-endian platforms: jump.nft:5:2-9: Error: Could not process rule: No such file or directory jump foo nft passes a 0-length name to the kernel. This is because when we export the value (the string), we provide the size of the destination buffer. In earlier versions, the parser allocated the name with the same fixed size and all was fine. After the fix, the export places the name in the wrong location in the destination buffer. This makes tests/shell/testcases/chains/0001jumps_0 work on s390x. v2: convert one error check to a BUG(), it should not happen unless kernel abi is broken. Fixes: 142350f154c78 ("src: invalid read when importing chain name") Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink_linearize.c')
0 files changed, 0 insertions, 0 deletions