From: Patrick McHardy <kaber@trash.net>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] tests: validate generated netlink instructions
Date: Sun, 16 Aug 2015 19:30:03 +0100 [thread overview]
Message-ID: <20150816183002.GF17659@macbook.localdomain> (raw)
In-Reply-To: <20150816182059.GD31357@breakpoint.cc>
On 16.08, Florian Westphal wrote:
> Patrick McHardy <kaber@trash.net> 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 :)
next prev parent reply other threads:[~2015-08-16 18:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 1:31 [PATCH nft] tests: validate generated netlink instructions Florian Westphal
2015-07-20 12:50 ` Pablo Neira Ayuso
2015-07-20 15:10 ` Florian Westphal
2015-07-20 15:27 ` Pablo Neira Ayuso
2015-07-20 17:05 ` Pablo Neira Ayuso
2015-07-20 18:35 ` Florian Westphal
2015-08-12 17:34 ` Pablo Neira Ayuso
2015-08-12 17:46 ` Florian Westphal
2015-08-13 9:53 ` Pablo Neira Ayuso
2015-08-13 14:45 ` Florian Westphal
2015-08-16 18:14 ` Patrick McHardy
2015-08-16 18:20 ` Florian Westphal
2015-08-16 18:30 ` Patrick McHardy [this message]
2015-08-19 0:49 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150816183002.GF17659@macbook.localdomain \
--to=kaber@trash.net \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).