From: Jarno Rajahalme Date: Wed, 15 Feb 2017 05:16:28 +0000 (-0800) Subject: openvswitch: Set internal device max mtu to ETH_MAX_MTU. X-Git-Tag: v4.10.16~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=853151191ef2b62fa02c4a9fdeb90a8baeb3d911;p=thirdparty%2Fkernel%2Fstable.git openvswitch: Set internal device max mtu to ETH_MAX_MTU. [ 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index d5d6caecd0726..695acd2f664c2 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c @@ -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;