diff mbox

ip_tunnel: Remove gratuitous skb scrubbing

Message ID 20150415100107.GA3655@gondor.apana.org.au
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu April 15, 2015, 10:01 a.m. UTC
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.

This patch reverts that change.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Herbert Xu April 15, 2015, 10:13 a.m. UTC | #1
On Wed, Apr 15, 2015 at 06:01:07PM +0800, Herbert Xu wrote:
> 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.
> 
> This patch reverts that change.
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Scratch this, I guess most of the scurbbing makes sense.  I'll
spin a patch to just preserves the mark.

Cheers,
diff mbox

Patch

diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 88c386c..709e711 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -54,7 +54,8 @@  int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
 	struct iphdr *iph;
 	int err;
 
-	skb_scrub_packet(skb, xnet);
+	if (xnet)
+		skb_scrub_packet(skb, true);
 
 	skb_clear_hash(skb);
 	skb_dst_set(skb, &rt->dst);