diff mbox

[nft] payload: fix ethernet type protocol matching

Message ID 1383508014-22185-1-git-send-email-pablo@netfilter.org
State Accepted
Headers show

Commit Message

Pablo Neira Ayuso Nov. 3, 2013, 7:46 p.m. UTC
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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/src/payload.c b/src/payload.c
index 0d22360..ea0d4e2 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -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",