On Tue, Aug 13, 2019 at 10:12:44PM +0200, Florian Westphal wrote:
> 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 <[email protected]>
Acked-by: Pablo Neira Ayuso <[email protected]>