Skip to contentSkip to conversation

Byteorder problem still exists in nft

nft Yanchuan Nian 1 participant 2 messages Sep 1, 2014 – Sep 2, 2014 1 message not in the archive netfilter

lore
Share & tools
lore
#0 lore raw

Hi,
There are still some byteorder prolems in nft.

The first one:
nft> add rule bridge filter input ip saddr 192.168.1.1 counter nft> list table bridge filter

table bridge filter {
	chain input {
		 type filter hook input priority 0;
		 unknown unknown 0xc0a80101 [invalid type] counter packets 0 bytes 0
	}
}

nft>
I guess this error occurs in payload_gen_dependency() which set the byteorder host endian but ether type is big endian.

The second one:
nft> add rule ip filter input ip length > 10 counter

BUG: invalid byte order conversion 0 => 2

nft: src/evaluate.c:153: byteorder_conversion_op: Assertion `0' failed. This is because the datatype of ip length is integer_type whose byteorder is invalid.

#2 lore raw
In reply to a message not in the archive
Quoted 27 lines · Alvaro Neira Ayuso

Hello

Quoted 11 lines · Yanchuan Nian

Hi,
There are still some byteorder prolems in nft.

The first one:
nft> add rule bridge filter input ip saddr 192.168.1.1 counter nft> list table bridge filter

table bridge filter {
        chain input {
                 type filter hook input priority 0;
                 unknown unknown 0xc0a80101 [invalid type] counter

packets 0 bytes 0

Quoted 4 lines
        }
}

nft>
I guess this error occurs in payload_gen_dependency() which set the

byteorder

Quoted 7 lines

host endian but ether type is big endian.

The second one:
nft> add rule ip filter input ip length > 10 counter

BUG: invalid byte order conversion 0 => 2

nft: src/evaluate.c:153: byteorder_conversion_op: Assertion `0' failed. This is because the datatype of ip length is integer_type whose byteorder

Quoted 8 lines

is invalid.

I have already reported this bug. I have sent some patches but Patrick showed me the best way to fix it and I'm working in some patches.

Regards

Alvaro

Oh, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html