From: Patrick McHardy <kaber@trash.net>
To: David Miller <davem@davemloft.net>
Cc: herbert@gondor.apana.org.au, fw@strlen.de, netdev@vger.kernel.org
Subject: Re: [PATCH -next 0/3] net: cap size to original frag size when refragmenting
Date: Thu, 16 Apr 2015 22:55:48 +0200 [thread overview]
Message-ID: <20150416205547.GA4020@acer.localdomain> (raw)
In-Reply-To: <20150416.113218.1551818529213866015.davem@davemloft.net>
On 16.04, David Miller wrote:
> > Netfilter may change the contents of the packet, even change its size.
> > It is *really* hard to do this while keeping the original fragments
> > intact.
>
> I keep hearing a lot of "it's hard" as the only reason we shouldn't do
> this properly, and that frankly sucks. People aren't looking for a
> solution and to be honest it's quite tiring.
>
> The common case is that the rules processed are simple, the size of
> the overall packet does _not_ change, and therefore the best thing
> to do is pass the entire thing as a unit with the frags in tact.
>
> That's the fundamental fact. It's also the fastest way to process
> these packets and avoids all of these stupid max frag garbage.
>
> Only at the point where netfilter makes changes to the size of the
> packet does it take "ownership" and get to take on the responsibility
> of making sure the new resulting fragments are sane.
>
> But only at that point.
Agreed, that part shouldn't be hard. We need to pass the defragmented
skb through the ruleset, meaning we need to pass it through the stack.
That's needed since the rules depend on this.
If we don't make changes, we can spit out the original fragments, but
for this we need to keep a reference to them from the skb. We still
need the max_frag_size thing, once a modification is made we drop the
frag list reference and just regulary refragment the modified skb
according to the limits.
prev parent reply other threads:[~2015-04-16 20:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 22:16 [PATCH -next 0/3] net: cap size to original frag size when refragmenting Florian Westphal
2015-04-10 22:16 ` [PATCH -next 1/3] ipv4: reject too-big defragmented DF-skb when forwarding Florian Westphal
2015-04-10 22:51 ` Hannes Frederic Sowa
2015-04-10 22:16 ` [PATCH -next 2/3] ipv6: don't increase size when refragmenting forwarded skbs Florian Westphal
2015-04-10 22:16 ` [PATCH -next 3/3] ipv4: don't remove df bit when refragmenting Florian Westphal
2015-04-12 8:51 ` Florian Westphal
2015-04-13 17:53 ` [PATCH -next 0/3] net: cap size to original frag size " David Miller
2015-04-13 18:40 ` Hannes Frederic Sowa
2015-04-13 18:56 ` Hannes Frederic Sowa
2015-04-13 20:16 ` David Miller
2015-04-13 20:33 ` Hannes Frederic Sowa
2015-04-16 4:56 ` Herbert Xu
2015-04-16 5:24 ` Patrick McHardy
2015-04-16 5:29 ` Herbert Xu
2015-04-16 5:42 ` Patrick McHardy
2015-04-16 12:11 ` Hannes Frederic Sowa
2015-04-16 15:43 ` David Miller
2015-04-16 16:13 ` Hannes Frederic Sowa
2015-04-16 20:47 ` Herbert Xu
2015-04-16 20:56 ` Patrick McHardy
2015-04-16 23:16 ` Hannes Frederic Sowa
2015-04-16 23:44 ` Patrick McHardy
2015-04-16 20:32 ` Patrick McHardy
2015-04-16 15:32 ` David Miller
2015-04-16 20:55 ` Patrick McHardy [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=20150416205547.GA4020@acer.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=herbert@gondor.apana.org.au \
--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