]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
openvswitch: Set internal device max mtu to ETH_MAX_MTU.
authorJarno Rajahalme <jarno@ovn.org>
Wed, 15 Feb 2017 05:16:28 +0000 (21:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 12:08:30 +0000 (14:08 +0200)
[ Upstream commit 425df17ce3a26d98f76e2b6b0af2acf4aeb0b026 ]

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/openvswitch/vport-internal_dev.c

index d5d6caecd0726c1223f78031bbd7f8a00b9ce0f9..695acd2f664c2e75825fd2fd8cc8eef4749b21cd 100644 (file)
@@ -151,6 +151,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;