]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: change shift byte-order to host-endian.
authorJeremy Sowden <jeremy@azazel.net>
Mon, 3 Feb 2020 11:20:20 +0000 (11:20 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 7 Feb 2020 15:57:30 +0000 (16:57 +0100)
commitaae18ff0b2aa18091c54be5873ddf1de97cd24ad
tree549a68b5b6862683fb1ea295da606dea99125ed0
parent05f50c4f8320e8b34593307c990d493324bb513d
evaluate: change shift byte-order to host-endian.

The byte-order of the righthand operands of the right-shifts generated
for payload and exthdr expressions is big-endian.  However, all right
operands should be host-endian.  Since evaluation of the shift binop
will insert a byte-order conversion to enforce this, change the
endianness in order to avoid the extra operation.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c