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

Commit b699d003 authored by Haishuang Yan's avatar Haishuang Yan Committed by David S. Miller
Browse files

sit: reload iphdr in ipip6_rcv



Since iptunnel_pull_header() can call pskb_may_pull(),
we must reload any pointer that was related to skb->head.

Fixes: a09a4c8d ("tunnels: Remove encapsulation offloads on decap")
Signed-off-by: default avatarHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77d4b1d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -657,6 +657,7 @@ static int ipip6_rcv(struct sk_buff *skb)
		if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6),
		    !net_eq(tunnel->net, dev_net(tunnel->dev))))
			goto out;
		iph = ip_hdr(skb);

		err = IP_ECN_decapsulate(iph, skb);
		if (unlikely(err)) {