Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit baafc77b authored by Saurabh Mohan's avatar Saurabh Mohan Committed by David S. Miller
Browse files

net/ipv4: ip_vti clear skb cb before tunneling.



If users apply shaper to vti tunnel then it will cause a kernel crash. The
problem seems to be due to the vti_tunnel_xmit function not clearing
skb->opt field before passing the packet to xfrm tunneling code.

Signed-off-by: default avatarSaurabh Mohan <saurabh@vyatta.com>
Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df465abf
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -361,8 +361,7 @@ static netdev_tx_t vti_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
			tunnel->err_count = 0;
	}

	IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
			      IPSKB_REROUTED);
	memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
	skb_dst_drop(skb);
	skb_dst_set(skb, &rt->dst);
	nf_reset(skb);