Re: [PATCH nft] proto: fix VLAN header definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick McHardy <kaber@xxxxxxxxx> wrote:
> Yes, I also did that and it looks correct. I think we probably have a
> discrepancy with bit numbering:
> 
> Looking at an older patch of you:
> 
> -               [IPHDR_VERSION]         = HDR_BITFIELD("version", &integer_type, 0, 4),
> -               [IPHDR_HDRLENGTH]       = HDR_BITFIELD("hdrlength", &integer_type, 4, 4),
> +               [IPHDR_VERSION]         = HDR_BITFIELD("version", &integer_type, 4, 4),
> +               [IPHDR_HDRLENGTH]       = HDR_BITFIELD("hdrlength", &integer_type, 0, 4),
> 
> So you seem to assume a numbering which corresponds to how you would express
> it in C. My patch assumes numbering as used in the RFCs/IEEE standards, which
> is basically the opposite direction.

Right, there is a general problem with all sub-byte fields.

I just noticed that decoding of ip version/hdrlen doesn't work either.
(ip hdrlength 4 ip version 5).

I am sure that I tested matching on ip version/hdrlen on both
x86-64 and a MSB machine (don't recall architecture, ppc i think).
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux