diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2017-06-04 14:43:43 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-04 23:04:31 -0400 |
commit | b699d0035836f6712917a41e7ae58d84359b8ff9 (patch) | |
tree | c6a2a1f2c5d17ad1a4500c0a63bba01200be0788 /net | |
parent | 77d4b1d36926a9b8387c6b53eeba42bcaaffcea3 (diff) | |
download | linux-b699d0035836f6712917a41e7ae58d84359b8ff9.tar.bz2 |
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.c | 1 |
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)) { |