Re: [PATCH nft] tests: validate generated netlink instructions

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

 



On 16.08, Florian Westphal wrote:
> Patrick McHardy <kaber@xxxxxxxxx> wrote:
> > I also have patches for this, but some corner cases and not working correctly
> > yet. I'm looking forward to your patches.
> 
> Any example?
> 
> I'm curious to see if my patches handles those :-)

Unfortunately not right now, new notebook and the data is not fully synced yet :)

My general approach is to generate shift expressions for data that is not byte
aligned, then have the shifts transfered to the constant side during bitop eval.

The cases which do not work fully correctly are those where the length of the
constant side needs to be increased to contain the shifted value. It will
incorrectly accept too large values for the field in question. F.i.
ip totlength is 4 bit wide and needs to be shifted by 4 bit, so my simple
approach of adding 4 to expr->len will allow values up to 255 from the user.

I'll send my patches over tommorrow so you can see if there's anything you
can use :)
--
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