From patchwork Tue Jan 28 14:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232597 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 A7D68C33CB3 for ; Tue, 28 Jan 2020 14:32:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 713E3246A7 for ; Tue, 28 Jan 2020 14:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221929; bh=sGzDFehRaZPVPmMg/ROjvVFMzFRiJsQGevwuvya4CHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1NNm5hsT6FfKh/ejaPTXDRQiqVcsvvTS+7aLxki8if0sBKFEga2/z0fWD/a8xA60N NApXPrPEuoCugmd/tCHXDoIU+prHlu+yZzUASkWeWqFGSFHiuxh/S6TSBKJ2dOsR4a M+iqHOC+T1jv3uQUg7gfLs378SqD/7unaWc4GvhI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727230AbgA1OcI (ORCPT ); Tue, 28 Jan 2020 09:32:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:54646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733246AbgA1O1A (ORCPT ); Tue, 28 Jan 2020 09:27:00 -0500 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 CA78520716; Tue, 28 Jan 2020 14:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221620; bh=sGzDFehRaZPVPmMg/ROjvVFMzFRiJsQGevwuvya4CHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9V8L/kmIXkTZM4TD6eTonDLFJ+d477PzVzi+YEtL92O8WdUGl5JzkPCt5Y95hQ6s lA8MIc1886QU1xbZbp4YEx2761CyOTWHnSE3sCN/c8MJuXS6+uP8jpohlIqPWejU4n jpg+CSBPTlZw6VraQD/vnGkwjxo2d5T7QaDYWrig= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niko Kortstrom , Nicolas Dichtel , William Tu , "David S. Miller" Subject: [PATCH 4.19 07/92] net: ip6_gre: fix moving ip6gre between namespaces Date: Tue, 28 Jan 2020 15:07:35 +0100 Message-Id: <20200128135810.196283555@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135809.344954797@linuxfoundation.org> References: <20200128135809.344954797@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Niko Kortstrom [ Upstream commit 690afc165bb314354667f67157c1a1aea7dc797a ] Support for moving IPv4 GRE tunnels between namespaces was added in commit b57708add314 ("gre: add x-netns support"). The respective change for IPv6 tunnels, commit 22f08069e8b4 ("ip6gre: add x-netns support") did not drop NETIF_F_NETNS_LOCAL flag so moving them from one netns to another is still denied in IPv6 case. Drop NETIF_F_NETNS_LOCAL flag from ip6gre tunnels to allow moving ip6gre tunnel endpoints between network namespaces. Signed-off-by: Niko Kortstrom Acked-by: Nicolas Dichtel Acked-by: William Tu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/ip6_gre.c | 3 --- 1 file changed, 3 deletions(-) --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -1486,7 +1486,6 @@ static int ip6gre_tunnel_init_common(str dev->mtu -= 8; if (tunnel->parms.collect_md) { - dev->features |= NETIF_F_NETNS_LOCAL; netif_keep_dst(dev); } ip6gre_tnl_init_features(dev); @@ -1914,7 +1913,6 @@ static void ip6gre_tap_setup(struct net_ dev->needs_free_netdev = true; dev->priv_destructor = ip6gre_dev_free; - dev->features |= NETIF_F_NETNS_LOCAL; dev->priv_flags &= ~IFF_TX_SKB_SHARING; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; netif_keep_dst(dev); @@ -2223,7 +2221,6 @@ static void ip6erspan_tap_setup(struct n dev->needs_free_netdev = true; dev->priv_destructor = ip6gre_dev_free; - dev->features |= NETIF_F_NETNS_LOCAL; dev->priv_flags &= ~IFF_TX_SKB_SHARING; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; netif_keep_dst(dev);