From e391b72b611403d184bbb26e3d076d543c7ea7c6 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 20 Sep 2013 16:01:33 +0200 Subject: meta: iif/oifname should be host byte order src/nft add rule filter output meta oifname eth0 doesn't work on x86. Problem is that nft declares these as BYTEORDER_INVALID, but when converting the string mpz_import_data treats INVALID like BIG_ENDIAN. [ cmp eq reg 1 0x00000000 0x00000000 0x65000000 0x00306874 ] as kernel nft_cmp_eval basically boils down to memcmp(reg, skb->dev->name, sizeof(reg) comparision fails. with patch: [ cmp eq reg 1 0x30687465 0x00000000 0x00000000 0x00000000 ] Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- src/ct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ct.c') diff --git a/src/ct.c b/src/ct.c index 1baefed8..e5ca593c 100644 --- a/src/ct.c +++ b/src/ct.c @@ -110,7 +110,7 @@ static const struct ct_template ct_templates[] = { BYTEORDER_HOST_ENDIAN, 4 * BITS_PER_BYTE), [NFT_CT_HELPER] = CT_TEMPLATE("helper", &string_type, - BYTEORDER_INVALID, 0), + BYTEORDER_HOST_ENDIAN, 0), [NFT_CT_L3PROTOCOL] = CT_TEMPLATE("l3proto", &invalid_type, BYTEORDER_INVALID, BITS_PER_BYTE), -- cgit v1.2.3