]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
payload: fix ethernet type protocol matching
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 30 Oct 2013 12:33:50 +0000 (13:33 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 4 Nov 2013 11:35:57 +0000 (12:35 +0100)
This fixes ethernet type protocol matching, which is needed
to match network layer information, eg.

 nft add rule bridge filter input ip protocol icmp counter

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/payload.c

index 0d223608563ed6fc1d919770c9d8214b4db7f2d5..ea0d4e260da84e33725f9e514e65763ec6f2ba24 100644 (file)
@@ -1010,7 +1010,7 @@ const struct datatype ethertype_type = {
        .type           = TYPE_ETHERTYPE,
        .name           = "ethertype",
        .desc           = "Ethernet protocol",
-       .byteorder      = BYTEORDER_HOST_ENDIAN,
+       .byteorder      = BYTEORDER_BIG_ENDIAN,
        .size           = 2 * BITS_PER_BYTE,
        .basetype       = &integer_type,
        .basefmt        = "0x%.4Zx",