Skip to content

Commit 11c21a3

Browse files
Duan Jiongdavem330
Duan Jiong
authored andcommitted
ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
commit a622260("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 0e6fbc5("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 a622260("ip_tunnel: fix kernel panic with icmp_dest_unreach"). Signed-off-by: Duan Jiong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9fe6cb5 commit 11c21a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv4/ip_tunnel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
686686
tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
687687
tunnel->err_count--;
688688

689+
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
689690
dst_link_failure(skb);
690691
} else
691692
tunnel->err_count = 0;

0 commit comments

Comments
 (0)