From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: ip_tunnel: Remove gratuitous skb scrubbing
Date: Wed, 15 Apr 2015 12:20:42 +0200 [thread overview]
Message-ID: <552E3B7A.2040701@6wind.com> (raw)
In-Reply-To: <20150415100107.GA3655@gondor.apana.org.au>
Le 15/04/2015 12:01, Herbert Xu a écrit :
> The commit ea23192e8e577dfc51e0f4fc5ca113af334edff9 ("tunnels:
> harmonize cleanup done on skb on rx path") broke anyone trying to
> use netfilter marking across IPv4 tunnels. As the commit message
> did not give any justification for this (in fact it shouldn't
> even be touching the tx path), I can only assume that it was a typo.
If I remember well, this was discussed on netdev (CC Eric). The goal of this
patch was, like the title said, to hamonize packets processing in tunnels.
I'm not against to keep the mark, but I think patching skb_scrub_packet is
better. With your patch, ip6tnl, gre6, etc. still drops the mark. And at the
end, it's not consistant.
What about something like this:
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3b6e5830256e..1d5f6bd0e383 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4124,14 +4124,15 @@ EXPORT_SYMBOL(skb_try_coalesce);
*/
void skb_scrub_packet(struct sk_buff *skb, bool xnet)
{
- if (xnet)
+ if (xnet) {
skb_orphan(skb);
+ skb->mark = 0;
+ }
skb->tstamp.tv64 = 0;
skb->pkt_type = PACKET_HOST;
skb->skb_iif = 0;
skb->ignore_df = 0;
skb_dst_drop(skb);
- skb->mark = 0;
skb_sender_cpu_clear(skb);
skb_init_secmark(skb);
secpath_reset(skb);
next prev parent reply other threads:[~2015-04-15 10:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 10:01 ip_tunnel: Remove gratuitous skb scrubbing Herbert Xu
2015-04-15 10:13 ` Herbert Xu
2015-04-15 10:20 ` Nicolas Dichtel [this message]
2015-04-15 10:22 ` Herbert Xu
2015-04-15 10:28 ` Nicolas Dichtel
2015-04-15 10:32 ` Herbert Xu
2015-04-15 13:57 ` Herbert Xu
2015-04-15 15:41 ` Nicolas Dichtel
2015-04-16 1:03 ` [v3] skbuff: Do not scrub skb mark within the same name space Herbert Xu
2015-04-16 7:02 ` James Morris
2015-04-16 7:35 ` Nicolas Dichtel
2015-04-16 7:59 ` Herbert Xu
2015-04-16 8:12 ` Revert "net: Reset secmark when scrubbing packet" Herbert Xu
2015-04-16 8:32 ` Thomas Graf
2015-04-16 18:21 ` David Miller
2015-04-16 8:33 ` [v3] skbuff: Do not scrub skb mark within the same name space Thomas Graf
2015-04-16 18:21 ` 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=552E3B7A.2040701@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=ebiederm@xmission.com \
--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;
as well as URLs for NNTP newsgroup(s).