aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_tunnel.c
diff options
context:
space:
mode:
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>2014-01-23 01:00:25 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-23 16:23:16 -0500
commit11c21a307d79ea5f6b6fc0d3dfdeda271e5e65f6 (patch)
tree24774ad28953a025f11d9f1d617d46f2eb9ac937 /net/ipv4/ip_tunnel.c
parent9fe6cb58378c3b8535e00dab7195b5d35defa17a (diff)
ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
commit a622260254ee48("ip_tunnel: fix kernel panic with icmp_dest_unreach") clear IPCB in ip_tunnel_xmit() , or else skb->cb[] may contain garbage from GSO segmentation layer. But commit 0e6fbc5b6c621("ip_tunnels: extend iptunnel_xmit()") refactor codes, and it clear IPCB behind the dst_link_failure(). So clear IPCB in ip_tunnel_xmit() just like commti a622260254ee48("ip_tunnel: fix kernel panic with icmp_dest_unreach"). Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r--net/ipv4/ip_tunnel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 1886cd40a3f6..c0e3cb72ad70 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -686,6 +686,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
686 tunnel->err_time + IPTUNNEL_ERR_TIMEO)) { 686 tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
687 tunnel->err_count--; 687 tunnel->err_count--;
688 688
689 memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
689 dst_link_failure(skb); 690 dst_link_failure(skb);
690 } else 691 } else
691 tunnel->err_count = 0; 692 tunnel->err_count = 0;