]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
vxlan: fix a free after use
authorLi RongQing <roy.qing.li@gmail.com>
Fri, 17 Oct 2014 06:06:16 +0000 (14:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Oct 2014 20:23:58 +0000 (16:23 -0400)
pskb_may_pull maybe change skb->data and make eth pointer oboslete,
so eth needs to reload

Fixes: 91269e390d062 ("vxlan: using pskb_may_pull as early as possible")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index 77ab844cd8ae57c976b60afab0e0dd8cc6d81930..ca309820d39e1ba7995f38d3a2f9bacbd1c1f857 100644 (file)
@@ -1887,6 +1887,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
                                    msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION)
                                        return neigh_reduce(dev, skb);
                }
+               eth = eth_hdr(skb);
 #endif
        }