From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B0B4C4360C for ; Sun, 6 Oct 2019 17:31:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 357692166E for ; Sun, 6 Oct 2019 17:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383094; bh=cgZgFd/MyqZp+VRVFZzQX0V4eZcpcLt7lcRV3xNctrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fB8iWai7d4x9n3RZx8ZF2yKaOUhhBoLgWHDp2gGMpd8+TM1jVpUfgWZ8gfU0m7HS9 G9BlGM1/9pVXtPzjS/tZg79brNGkjOIriav1sAEoyuor4G5nxeBD4457OzlaYYB49s Hh8OVo5F0AXdc9TFv778dkVrUaXAwxOobXdg1pSc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729443AbfJFRbd (ORCPT ); Sun, 6 Oct 2019 13:31:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:57826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729440AbfJFRbc (ORCPT ); Sun, 6 Oct 2019 13:31:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6823321479; Sun, 6 Oct 2019 17:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383091; bh=cgZgFd/MyqZp+VRVFZzQX0V4eZcpcLt7lcRV3xNctrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDYCMtYYFgyQ431ffcEuF49Hbi1LDfnmk2I54E3ury3ATYtZeZpK0MY65WM9yDX6R txHOavugkxhtudc0CrFO2Jyw+tfKgha8qprIX03S7UqVS+TE2bKZI0qmb5dKzNuZIH eJ7juJvr8Q1/8UxqZWtaQyAhcKMVuurWLom8O73Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haishuang Yan , "David S. Miller" Subject: [PATCH 4.19 081/106] erspan: remove the incorrect mtu limit for erspan Date: Sun, 6 Oct 2019 19:21:27 +0200 Message-Id: <20191006171157.579189883@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Haishuang Yan [ Upstream commit 0e141f757b2c78c983df893e9993313e2dc21e38 ] erspan driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the erspan device to not be greater than 1500, this limit value is not correct for ipgre tap device. Tested: Before patch: # ip link set erspan0 mtu 1600 Error: mtu greater than device maximum. After patch: # ip link set erspan0 mtu 1600 # ip -d link show erspan0 21: erspan0@NONE: mtu 1600 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 0 Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ip_gre.c | 1 + 1 file changed, 1 insertion(+) --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -1531,6 +1531,7 @@ static void erspan_setup(struct net_devi struct ip_tunnel *t = netdev_priv(dev); ether_setup(dev); + dev->max_mtu = 0; dev->netdev_ops = &erspan_netdev_ops; dev->priv_flags &= ~IFF_TX_SKB_SHARING; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;