]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: no need to swap byte-order for values of fewer than 16 bits.
authorJeremy Sowden <jeremy@azazel.net>
Tue, 3 Mar 2020 09:48:31 +0000 (09:48 +0000)
committerFlorian Westphal <fw@strlen.de>
Wed, 4 Mar 2020 22:36:45 +0000 (23:36 +0100)
commitbb03cbcd18a1e3e2c029ecaaf9b58d3dd6987b14
tree64f6e8e6c4cf4d589852ebdd9483d7b7620ba2da
parent904bad2bcfa72cb197e9fe18db3c4681086000ea
evaluate: no need to swap byte-order for values of fewer than 16 bits.

Endianness is not meaningful for objects smaller than 2 bytes and the
byte-order conversions are no-ops in the kernel, so just update the
expression as if it were constant.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
src/evaluate.c
tests/py/any/meta.t.payload