summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>2017-06-04 08:43:43 +0200
committerDavid S. Miller <davem@davemloft.net>2017-06-05 05:04:31 +0200
commitb699d0035836f6712917a41e7ae58d84359b8ff9 (patch)
treec6a2a1f2c5d17ad1a4500c0a63bba01200be0788 /net
parentnet: ping: do not abuse udp_poll() (diff)
downloadlinux-b699d0035836f6712917a41e7ae58d84359b8ff9.tar.xz
linux-b699d0035836f6712917a41e7ae58d84359b8ff9.zip
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: a09a4c8dd1ec ("tunnels: Remove encapsulation offloads on decap") Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/sit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 61e5902f0687..af832e7ce80f 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -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)) {