]> git.ipfire.org Git - thirdparty/nftables.git/commit
payload: take endianess into account when updating the payload context
authorPatrick McHardy <kaber@trash.net>
Mon, 18 Aug 2014 23:21:59 +0000 (00:21 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 18 Aug 2014 23:21:59 +0000 (00:21 +0100)
commit69ade79302b9bc7d88fa58db9d30555e54ef7887
treed6da7ef1b11e5330778dd1894342cb97f9db52f4
parent6ef2c71e9772a8bd1be7ddf376e1be26c3334110
payload: take endianess into account when updating the payload context

payload_expr_pctx_update() uses the numeric protocol value in host byte
order to find the upper layer protocol. This obviously doesn't work for
protocol expressions in other byte orders, such as the ethernet protocol
on little endian.

Export the protocol value in the correct byte order and use that value
to look up the upper layer protocol.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/payload.c