summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_tunnel_core.c
diff options
context:
space:
mode:
authorNicolas Dichtel2013-09-02 15:34:57 +0200
committerDavid S. Miller2013-09-04 06:27:25 +0200
commit963a88b31ddbbe99f38502239b1a46601773d217 (patch)
tree9c07bbee7240db69d82d2152b7e47013012c739b /net/ipv4/ip_tunnel_core.c
parentskb: allow skb_scrub_packet() to be used by tunnels (diff)
downloadkernel-qcow2-linux-963a88b31ddbbe99f38502239b1a46601773d217.tar.gz
kernel-qcow2-linux-963a88b31ddbbe99f38502239b1a46601773d217.tar.xz
kernel-qcow2-linux-963a88b31ddbbe99f38502239b1a46601773d217.zip
tunnels: harmonize cleanup done on skb on xmit path
The goal of this patch is to harmonize cleanup done on a skbuff on xmit path. Before this patch, behaviors were different depending of the tunnel type. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel_core.c')
-rw-r--r--net/ipv4/ip_tunnel_core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index e82045842351..d6c856b17fd4 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -48,16 +48,15 @@
int iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
- __u8 tos, __u8 ttl, __be16 df)
+ __u8 tos, __u8 ttl, __be16 df, bool xnet)
{
int pkt_len = skb->len;
struct iphdr *iph;
int err;
- nf_reset(skb);
- secpath_reset(skb);
+ skb_scrub_packet(skb, xnet);
+
skb->rxhash = 0;
- skb_dst_drop(skb);
skb_dst_set(skb, &rt->dst);
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));