Patch "vxlan: restore dev->mtu setting based on lower device" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
vxlan: restore dev->mtu setting based on lower device
to the 4.14-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:
vxlan-restore-dev-mtu-setting-based-on-lower-device.patch
and it can be found in the queue-4.14 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 Sun Dec 31 11:12:48 CET 2017
From: Alexey Kodanev <[email protected]>
Date: Thu, 14 Dec 2017 20:20:00 +0300
Subject: vxlan: restore dev->mtu setting based on lower device
From: Alexey Kodanev <[email protected]>
[ Upstream commit f870c1ff65a6d1f3a083f277280802ee09a5b44d ]
Stefano Brivio says:
Commit a985343ba906 ("vxlan: refactor verification and application of configuration") introduced a change in the behaviour of initial MTU setting: earlier, the MTU for a link created on top of a given lower device, without an initial MTU specification, was set to the MTU of the lower device minus headroom as a result of this path in vxlan_dev_configure():
if (!conf->mtu)
dev->mtu = lowerdev->mtu -
(use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM);
which is now gone. Now, the initial MTU, in absence of a configured value, is simply set by ether_setup() to ETH_DATA_LEN (1500 bytes).
This breaks userspace expectations in case the MTU of the lower device is higher than 1500 bytes minus headroom.
This patch restores the previous behaviour on newlink operation. Since max_mtu can be negative and we update dev->mtu directly, also check it for valid minimum.
--- drivers/net/vxlan.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/vxlan.c +5 -0
@@ -3105,6 +3105,11 @@ static void vxlan_config_apply(struct ne max_mtu = lowerdev->mtu - (use_ipv6 ?VXLAN6_HEADROOM :VXLAN_HEADROOM ); +if (max_mtu <ETH_MIN_MTU ) + max_mtu =ETH_MIN_MTU ; + +if (!changelink && !conf->mtu) + dev->mtu = max_mtu; }if (dev->mtu > max_mtu)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/vxlan-restore-dev-mtu-setting-based-on-lower-device.patch queue-4.14/ip6_gre-fix-device-features-for-ioctl-setup.patch