]> git.ipfire.org Git - thirdparty/nftables.git/commit
datatype: ll: use big endian byte ordering
authorFlorian Westphal <fw@strlen.de>
Fri, 9 Sep 2016 11:44:50 +0000 (13:44 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 9 Sep 2016 13:53:14 +0000 (15:53 +0200)
commit42e2ec0198dd1408da4a32e1beefe9cbc0fdae89
treedfb6685f29bffa4942c99e74a2a63d1010904017
parent0d7fdb10b10c7a6c276cdb467d824db9b032140b
datatype: ll: use big endian byte ordering

ether daddr set 00:03:2d:2b:74:ec  is listed as:
ether daddr set ec:74:2b:2d:03:00

(it was fine without 'set' keyword).  Reason is that
ether address was listed as being HOST endian.

The payload expression (unlike statement) path contains
a few conversion call sites for this, i.e.:

if (tmp->byteorder == BYTEORDER_HOST_ENDIAN)
   mpz_switch_byteorder(tmp->value, tmp->len / BITS_PER_BYTE);

... it might make sense to remove those in a followup patch.

Reported-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/datatype.c
src/proto.c