From: Florian Westphal <fw@strlen.de>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Joe Stringer' <joe@ovn.org>,
"netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>, "fw@strlen.de" <fw@strlen.de>,
"diproiettod@vmware.com" <diproiettod@vmware.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH nf] netfilter: ipv6: Orphan skbs in nf_ct_frag6_gather()
Date: Thu, 14 Apr 2016 10:40:15 +0200 [thread overview]
Message-ID: <20160414084015.GA3192@breakpoint.cc> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D5F4A226C@AcuExch.aculab.com>
David Laight <David.Laight@ACULAB.COM> wrote:
> From: Joe Stringer
> > Sent: 13 April 2016 19:10
> > This is the IPv6 equivalent of commit 8282f27449bf ("inet: frag: Always
> > orphan skbs inside ip_defrag()").
> >
> > Prior to commit 029f7f3b8701 ("netfilter: ipv6: nf_defrag: avoid/free
> > clone operations"), ipv6 fragments sent to nf_ct_frag6_gather() would be
> > cloned (implicitly orphaning) prior to queueing for reassembly. As such,
> > when the IPv6 message is eventually reassembled, the skb->sk for all
> > fragments would be NULL. After that commit was introduced, rather than
> > cloning, the original skbs were queued directly without orphaning. The
> > end result is that all frags except for the first and last may have a
> > socket attached.
>
> I'd have thought that the queued fragments would still want to be
> resource-counted against the socket (I think that is what skb->sk is for).
No, ipv4/ipv6 reasm has its own accouting.
> Although I can't imagine why IPv6 reassembly is happening on skb
> associated with a socket.
Right, thats a much more interesting question -- both ipv4 and
ipv6 orphan skbs before NF_HOOK prerouting trip.
(That being said, I don't mind the patch, I'm just be curious how this
can happen).
next prev parent reply other threads:[~2016-04-14 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 18:09 [PATCH nf] netfilter: ipv6: Orphan skbs in nf_ct_frag6_gather() Joe Stringer
2016-04-14 8:31 ` David Laight
2016-04-14 8:40 ` Florian Westphal [this message]
2016-04-14 10:35 ` Pablo Neira Ayuso
2016-04-15 0:35 ` Joe Stringer
2016-04-18 18:35 ` Pablo Neira Ayuso
2016-04-18 21:49 ` Joe Stringer
2016-04-15 0:14 ` Joe Stringer
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=20160414084015.GA3192@breakpoint.cc \
--to=fw@strlen.de \
--cc=David.Laight@ACULAB.COM \
--cc=diproiettod@vmware.com \
--cc=joe@ovn.org \
--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 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).