* Patch "geneve: fix max_mtu setting" has been added to the 4.6-stable tree
@ 2016-07-13 22:39 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-13 22:39 UTC (permalink / raw)
To: yanhaishuang, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
geneve: fix max_mtu setting
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
geneve-fix-max_mtu-setting.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Jul 14 07:36:41 JST 2016
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Sat, 2 Jul 2016 15:02:48 +0800
Subject: geneve: fix max_mtu setting
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
[ Upstream commit d5d5e8d55732c7c35c354e45e3b0af2795978a57 ]
For ipv6+udp+geneve encapsulation data, the max_mtu should subtract
sizeof(ipv6hdr), instead of sizeof(iphdr).
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/geneve.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1092,12 +1092,17 @@ static netdev_tx_t geneve_xmit(struct sk
static int __geneve_change_mtu(struct net_device *dev, int new_mtu, bool strict)
{
+ struct geneve_dev *geneve = netdev_priv(dev);
/* The max_mtu calculation does not take account of GENEVE
* options, to avoid excluding potentially valid
* configurations.
*/
- int max_mtu = IP_MAX_MTU - GENEVE_BASE_HLEN - sizeof(struct iphdr)
- - dev->hard_header_len;
+ int max_mtu = IP_MAX_MTU - GENEVE_BASE_HLEN - dev->hard_header_len;
+
+ if (geneve->remote.sa.sa_family == AF_INET6)
+ max_mtu -= sizeof(struct ipv6hdr);
+ else
+ max_mtu -= sizeof(struct iphdr);
if (new_mtu < 68)
return -EINVAL;
Patches currently in stable-queue which might be from yanhaishuang@cmss.chinamobile.com are
queue-4.6/geneve-fix-max_mtu-setting.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-13 22:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 22:39 Patch "geneve: fix max_mtu setting" has been added to the 4.6-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).