geneve: fix ip_hdr_len reserved for geneve6 tunnel.
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Mon, 28 Nov 2016 05:26:58 +0000 (13:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 21:14:49 +0000 (16:14 -0500)
It shold reserved sizeof(ipv6hdr) for geneve in ipv6 tunnel.

Fixes: c3ef5aa5e5 ('geneve: Merge ipv4 and ipv6 geneve_build_skb()')
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/geneve.c

index 7b80e2879b70045698f6f9483611af4ff1ef0bde..45301cb98bc1c279a760e2b19cd1ed32b4659a9f 100644 (file)
@@ -852,7 +852,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
                                           ip_hdr(skb), skb);
                ttl = key->ttl ? : ip6_dst_hoplimit(dst);
        }
-       err = geneve_build_skb(dst, skb, info, xnet, sizeof(struct iphdr));
+       err = geneve_build_skb(dst, skb, info, xnet, sizeof(struct ipv6hdr));
        if (unlikely(err))
                return err;