[PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t
kaber at trash.net
Sun Dec 4 21:02:08 CET 2005
David S. Miller wrote:
> From: Patrick McHardy <kaber at trash.net>
> Date: Sun, 04 Dec 2005 17:05:06 +0100
>>It doesn't even affect compatiblity, userspace can send both
>>u_int8_t or u_int16_t, the binary representation will look the same.
> On little-endian, yes. But on big-endian you'll get a byte-swapped
> value for the case where userspace sends in a u8.
Yes. Unfortunately we don't have much choice because kernel and
userspace use both u_int8_t and u_int16_t for CTA_PROTO_NUM. Some
ugly workarounds might be possible, but considering that ctnetlink
is new and how much problems it still has, it shouldn't be a big
problem to do this right and break compatibility.
More information about the netfilter-devel