From: Florian Westphal <fw@strlen.de>
To: Joe Stringer <joestringer@nicira.com>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org,
Linux Netdev List <netdev@vger.kernel.org>,
Andy Zhou <azhou@nicira.com>
Subject: Re: [PATCH nf-next 0/4] netfilter: rework netfilter ipv6 defrag
Date: Tue, 20 Oct 2015 22:53:07 +0200 [thread overview]
Message-ID: <20151020205306.GK4386@breakpoint.cc> (raw)
In-Reply-To: <CANr6G5xW7m2SXFiU22pFVD6uvDj5ymX=jZkRJk2vMYQoJykvLw@mail.gmail.com>
Joe Stringer <joestringer@nicira.com> wrote:
> > Good point. No, I don't. Any suggestions?
> > I can try to just re-target -nf tree (sans patch #2). Pablo?
>
> The smallest change seems to be adding the nf_ct_frag6_consume_orig()
> call to OVS, plus the morph logic from patch 3. Alternatively if Pablo
> is fine with having the series re-targeted, then that sounds
> reasonable to me too.
Pablo, your call.
I would suggest to re-target patches #1 and #3 to nf tree, I can do
this, just let me know.
Alternative is to just add the nf_ct_frag6_consume_orig call to
openvswitch and handle that via net tree.
I can then wait for that change to pop up in nf-next and just resend
this series (which will then undo that change).
Let me know, thanks!
> > ipv4 side seems broken as well (ip_defrag frees skb on errors other than
> > -EINPROGRESS, so it looks like we will double-free in
> > do_execute_actions)
>
> Oh dear. Thanks for the report. I propose wrapping the ip_defrag()
> with an skb_get()/skb_consume() as this seems to require the least
> invasive changes:
>
> diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
> index a5ec34f8502f..0d2d24c99fd5 100644
> --- a/net/openvswitch/conntrack.c
> +++ b/net/openvswitch/conntrack.c
> @@ -303,7 +303,11 @@ static int handle_fragments(struct net *net,
> struct sw_flow_key *key,
> int err;
>
> memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
> +
> + skb_get(skb);
> err = ip_defrag(skb, user);
> + if (!err || err == -EINPROGRESS)
> + consume_skb(skb);
> if (err)
> return err;
Indeed, that seems like the least invasive change.
Feel free to submit this to -net, there is no dependency on any of the
other changes.
next prev parent reply other threads:[~2015-10-20 20:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 20:14 [PATCH nf-next 0/4] netfilter: rework netfilter ipv6 defrag Florian Westphal
2015-10-17 20:14 ` [PATCH nf-next 1/4] netfilter: ipv6: remove extra clone/free operations Florian Westphal
2015-10-17 20:14 ` [PATCH nf-next 2/4] inet: kill obsolete skb_free op Florian Westphal
2015-10-17 20:14 ` [PATCH nf-next 3/4] netfilter: ipv6: in-place replacement of last skb Florian Westphal
2015-10-20 18:39 ` Joe Stringer
2015-10-20 20:46 ` Florian Westphal
2015-10-17 20:14 ` [PATCH nf-next 4/4] netfilter: ipv6: avoid nf_iterate recursion Florian Westphal
2015-10-20 6:25 ` Joe Stringer
2015-10-20 8:18 ` Florian Westphal
2015-10-20 6:16 ` [PATCH nf-next 0/4] netfilter: rework netfilter ipv6 defrag Joe Stringer
2015-10-20 8:17 ` Florian Westphal
2015-10-20 18:43 ` Joe Stringer
2015-10-20 20:53 ` Florian Westphal [this message]
2015-10-20 23:59 ` Joe Stringer
2015-10-21 12:42 ` Pablo Neira Ayuso
2015-10-21 14:50 ` Florian Westphal
2015-10-21 16:52 ` Joe Stringer
2015-10-21 14:34 ` David Miller
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=20151020205306.GK4386@breakpoint.cc \
--to=fw@strlen.de \
--cc=azhou@nicira.com \
--cc=joestringer@nicira.com \
--cc=netdev@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.