2016-11-28 05:27:19

by Haishuang Yan

[permalink] [raw]
Subject: [PATCH] geneve: fix ip_hdr_len reserved for geneve6 tunnel.

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 <[email protected]>
---
drivers/net/geneve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 7b80e28..45301cb 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -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;

--
1.8.3.1




2016-11-28 05:57:41

by Pravin Shelar

[permalink] [raw]
Subject: Re: [PATCH] geneve: fix ip_hdr_len reserved for geneve6 tunnel.

On Sun, Nov 27, 2016 at 9:26 PM, Haishuang Yan
<[email protected]> wrote:
> 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 <[email protected]>

Thanks for fix.

Acked-by: Pravin B Shelar <[email protected]>

2016-11-28 21:15:17

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] geneve: fix ip_hdr_len reserved for geneve6 tunnel.

From: Haishuang Yan <[email protected]>
Date: Mon, 28 Nov 2016 13:26:58 +0800

> 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 <[email protected]>

Applied, thanks.