]> git.proxmox.com Git - pve-kernel.git/commitdiff
add OVS MTU fix
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 27 Mar 2017 10:41:31 +0000 (12:41 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 27 Mar 2017 10:41:31 +0000 (12:41 +0200)
Makefile
openvswitch-Set-internal-device-max-mtu-to-ETH_MAX_M.patch [new file with mode: 0644]

index 893343e4dbc0356f5ffb3f6ff87acdb8264c92b9..25a5fc0af5bc1d0a4729ba20ec60880b384f8027 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -260,6 +260,7 @@ ${KERNEL_SRC}/README ${KERNEL_CFG_ORG}: ${KERNEL_SRC_SUBMODULE} | submodules
        cd ${KERNEL_SRC}; patch -p1 < ../kvm-dynamic-halt-polling-disable-default.patch
        cd ${KERNEL_SRC}; patch -p1 < ../cgroup-cpuset-add-cpuset.remap_cpus.patch
        cd ${KERNEL_SRC}; patch -p1 < ../CVE-2017-2596-kvm-page-reference-leakage-in-handle_vmon.patch
+       cd ${KERNEL_SRC}; patch -p1 < ../openvswitch-Set-internal-device-max-mtu-to-ETH_MAX_M.patch
        sed -i ${KERNEL_SRC}/Makefile -e 's/^EXTRAVERSION.*$$/EXTRAVERSION=${EXTRAVERSION}/'
        touch $@
 
diff --git a/openvswitch-Set-internal-device-max-mtu-to-ETH_MAX_M.patch b/openvswitch-Set-internal-device-max-mtu-to-ETH_MAX_M.patch
new file mode 100644 (file)
index 0000000..8286d3f
--- /dev/null
@@ -0,0 +1,41 @@
+From 425df17ce3a26d98f76e2b6b0af2acf4aeb0b026 Mon Sep 17 00:00:00 2001
+From: Jarno Rajahalme <jarno@ovn.org>
+Date: Tue, 14 Feb 2017 21:16:28 -0800
+Subject: [PATCH] openvswitch: Set internal device max mtu to ETH_MAX_MTU.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 91572088e3fd ("net: use core MTU range checking in core net
+infra") changed the openvswitch internal device to use the core net
+infra for controlling the MTU range, but failed to actually set the
+max_mtu as described in the commit message, which now defaults to
+ETH_DATA_LEN.
+
+This patch fixes this by setting max_mtu to ETH_MAX_MTU after
+ether_setup() call.
+
+Fixes: 91572088e3fd ("net: use core MTU range checking in core net infra")
+Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ net/openvswitch/vport-internal_dev.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
+index 09141a1..89193a6 100644
+--- a/net/openvswitch/vport-internal_dev.c
++++ b/net/openvswitch/vport-internal_dev.c
+@@ -149,6 +149,8 @@ static void do_setup(struct net_device *netdev)
+ {
+       ether_setup(netdev);
++      netdev->max_mtu = ETH_MAX_MTU;
++
+       netdev->netdev_ops = &internal_dev_netdev_ops;
+       netdev->priv_flags &= ~IFF_TX_SKB_SHARING;
+-- 
+2.1.4
+