Patch "geneve: fix max_mtu setting" has been added to the 4.6-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Jul 14 07:36:41 JST 2016
From: Haishuang Yan <[email protected]>
Date: Sat, 2 Jul 2016 15:02:48 +0800
Subject: geneve: fix max_mtu setting
From: Haishuang Yan <[email protected]>
[ Upstream commit d5d5e8d55732c7c35c354e45e3b0af2795978a57 ]
For ipv6+udp+geneve encapsulation data, the max_mtu should subtract sizeof(ipv6hdr), instead of sizeof(iphdr).
--- drivers/net/geneve.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/geneve.c +7 -2
@@ -1092,12 +1092,17 @@ static netdev_tx_t geneve_xmit(struct skstatic 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 [email protected] are
queue-4.6/geneve-fix-max_mtu-setting.patch