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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 10E49C04E87 for ; Wed, 15 May 2019 12:00:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA35720881 for ; Wed, 15 May 2019 12:00:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557921601; bh=WSi2F3UmA+pw0fP1sHBvGdLDfQyed5uZVYLj3tIf/V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z4iSpFi+AnIW/8Uh7r8E89M80oHNNLjH6JtBDm2PN40h2ZUzWzpmKbLV6vX+HCRV7 r6izgspvCiXMy6xvKogoKUgdItdCKWMalUJ5S6yYdGcBIkoTef3aL7vI6War7tZU5m B+reJ4SFLjM6hE8qb1ky9BfJpsNPxDfuAtrozsV4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730016AbfEOLPG (ORCPT ); Wed, 15 May 2019 07:15:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:51484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730239AbfEOLPF (ORCPT ); Wed, 15 May 2019 07:15:05 -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 A156A2084F; Wed, 15 May 2019 11:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557918905; bh=WSi2F3UmA+pw0fP1sHBvGdLDfQyed5uZVYLj3tIf/V0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYq6x0MsJQGafRP0+fCPkosw41joUYkMJjzgkTAxkM9VDpCfSQ4044NfvoD+66rNM cl8qZ/2QG1Lm6kTom5m3CcP1s2mo8C5CcUIJxlc4XjAGG9hvX3Y7UPWi+BFT+Tr654 neN9YVN0NTvToaIvzcJsdIIpWLPQbTZaAKaPYxqk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephen Suryaputra , David Ahern , "David S. Miller" Subject: [PATCH 4.9 45/51] vrf: sit mtu should not be updated when vrf netdev is the link Date: Wed, 15 May 2019 12:56:20 +0200 Message-Id: <20190515090629.026454910@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090616.669619870@linuxfoundation.org> References: <20190515090616.669619870@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: Stephen Suryaputra [ Upstream commit ff6ab32bd4e073976e4d8797b4d514a172cfe6cb ] VRF netdev mtu isn't typically set and have an mtu of 65536. When the link of a tunnel is set, the tunnel mtu is changed from 1480 to the link mtu minus tunnel header. In the case of VRF netdev is the link, then the tunnel mtu becomes 65516. So, fix it by not setting the tunnel mtu in this case. Signed-off-by: Stephen Suryaputra Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/sit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -1069,7 +1069,7 @@ static void ipip6_tunnel_bind_dev(struct if (!tdev && tunnel->parms.link) tdev = __dev_get_by_index(tunnel->net, tunnel->parms.link); - if (tdev) { + if (tdev && !netif_is_l3_master(tdev)) { int t_hlen = tunnel->hlen + sizeof(struct iphdr); dev->hard_header_len = tdev->hard_header_len + sizeof(struct iphdr);