Skip to content

Commit b699d00

Browse files
Haishuang Yandavem330
authored andcommitted
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: a09a4c8 ("tunnels: Remove encapsulation offloads on decap") Signed-off-by: Haishuang Yan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 77d4b1d commit b699d00

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv6/sit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,7 @@ static int ipip6_rcv(struct sk_buff *skb)
657657
if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6),
658658
!net_eq(tunnel->net, dev_net(tunnel->dev))))
659659
goto out;
660+
iph = ip_hdr(skb);
660661

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

0 commit comments

Comments
 (0)