From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 00/10] nft: exthdr fixes and improvements
Date: Wed, 2 Mar 2016 13:00:14 +0100 [thread overview]
Message-ID: <20160302120014.GA4737@salvia> (raw)
In-Reply-To: <1456846670-28179-1-git-send-email-fw@strlen.de>
Hi Florian,
On Tue, Mar 01, 2016 at 04:37:40PM +0100, Florian Westphal wrote:
> This adds following enhancements and fixes for the exthdr
> expression.
>
> #1. Treat exthdr as if user asked for an ip6 protocol header field,
> i.e. add ipv6 dependency for bridge/netdev/inet family.
>
> #2. Add scaling and masking to handle protocol headers that have
> non-byte divisible sizes.
>
> Tested briefly with following dummy rules (nf_defrag_ipv6 module not loaded):
>
> frag frag-off 0 counter packets 40 bytes 59840
> frag frag-off 131 counter packets 0 bytes 0
> frag frag-off 1448 counter packets 0 bytes 0
> frag frag-off 181 counter packets 40 bytes 59840
> frag frag-off > 0 counter packets 120 bytes 148160
>
> Note that the offsets are *NOT* scaled, i.e. we match the raw values
> contained in the packet. To match offset of 1448 one thus needs to
> ask for 181.
>
> This is same behaviour as ip hdrlength, where 5 matches a value of 20 bytes.
This looks good to me.
I still think we should move part of this to the evaluation phase so
we catch other corner cases, but we can revisit that later on. Willing
to have a look at this at some point.
Thanks.
prev parent reply other threads:[~2016-03-02 12:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 15:37 [PATCH nft 00/10] nft: exthdr fixes and improvements Florian Westphal
2016-03-01 15:37 ` [PATCH nft 01/10] evaluate: enforce ip6 proto with exthdr expression Florian Westphal
2016-03-01 15:37 ` [PATCH nft 02/10] netlink: split generic part of netlink_gen_payload_mask into helper Florian Westphal
2016-03-01 15:37 ` [PATCH nft 03/10] netlink: add and use netlink_gen_exthdr_mask Florian Westphal
2016-03-01 15:37 ` [PATCH nft 04/10] payload: move payload_gen_dependency generic part to helper Florian Westphal
2016-03-01 15:37 ` [PATCH nft 05/10] exthdr: generate dependencies for inet/bridge/netdev family Florian Westphal
2016-03-01 15:37 ` [PATCH nft 06/10] tests: add/fix inet+exthdr tests Florian Westphal
2016-03-01 15:37 ` [PATCH nft 07/10] exthdr: remove implicit dependencies Florian Westphal
2016-03-01 15:37 ` [PATCH nft 08/10] exthdr: store offset for later use Florian Westphal
2016-03-01 15:37 ` [PATCH nft 09/10] netlink_delinearize: prepare binop_postprocess for exthdr demux Florian Westphal
2016-03-01 15:37 ` [PATCH nft 10/10] netlink_delinearize: handle extension header templates with odd sizes Florian Westphal
2016-03-02 12:00 ` Pablo Neira Ayuso [this message]
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=20160302120014.GA4737@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).