lkml.org 
[lkml]   [2018]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.4 122/167] sit: reload iphdr in ipip6_rcv
    Date
    From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

    [ Upstream commit b699d0035836f6712917a41e7ae58d84359b8ff9 ]

    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>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    ---
    net/ipv6/sit.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
    index bbba435d0639..e71656fb5a22 100644
    --- a/net/ipv6/sit.c
    +++ b/net/ipv6/sit.c
    @@ -690,6 +690,7 @@ static int ipip6_rcv(struct sk_buff *skb)

    if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6)))
    goto out;
    + iph = ip_hdr(skb);

    err = IP_ECN_decapsulate(iph, skb);
    if (unlikely(err)) {
    --
    2.14.1
    \
     
     \ /
      Last update: 2018-03-19 18:12    [W:4.110 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site