From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: ben@bigfootnetworks.com, netdev@vger.kernel.org
Subject: Re: Bridge + Conntrack + SKB Recycle: Fragment Reassembly Errors
Date: Sat, 21 Nov 2009 11:08:32 -0800 (PST) [thread overview]
Message-ID: <20091121.110832.213888237.davem@davemloft.net> (raw)
In-Reply-To: <4AF999DE.9060206@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Tue, 10 Nov 2009 17:50:38 +0100
> This code in ip_fragment() looks suspicious:
>
> if (skb_has_frags(skb)) {
> ...
> skb_walk_frags(skb, frag) {
> ...
> if (skb->sk) {
> frag->sk = skb->sk;
> frag->destructor = sock_wfree;
> truesizes += frag->truesize;
> }
>
> truesizes is later used to adjust truesize of the head skb.
> For some reason this is only done when it originated from a
> local socket.
Well, it shouldn't look _that_ suspicious.
What this code is doing is making sure that after we make all of these
changes, the truesize of the SKBs referrng to the socket do not
change.
It's simply making sure that the math works out when all the
sock_wfree() calls occur later.
If we don't have a socket involved, there is no reason to make
these adjustments.
next prev parent reply other threads:[~2009-11-21 19:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 16:09 Bridge + Conntrack + SKB Recycle: Fragment Reassembly Errors ben
2009-11-10 16:50 ` Patrick McHardy
2009-11-21 19:08 ` David Miller [this message]
2009-11-22 0:21 ` Patrick McHardy
2009-11-22 0:29 ` Patrick McHardy
2009-12-01 16:00 ` ben
2009-12-01 16:24 ` Patrick McHardy
2009-12-01 23:54 ` 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=20091121.110832.213888237.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ben@bigfootnetworks.com \
--cc=kaber@trash.net \
--cc=netdev@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).