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 F11D5C2D0DB for ; Tue, 28 Jan 2020 14:27:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCDDA2468D for ; Tue, 28 Jan 2020 14:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221632; bh=PC0id2miedv7/wiSN1qvLDzT5fsZnx2ZkPMCamtFNYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QVjgRW1tlKJJAQ1cZNW82uIapXqiM+gG+oB17oj/zjdny7fJ4WIns3yVfF33celz7 Cii88E+pgetu2sX+I280PM0O5+dZ9tZaqTT3xDD918/L2tzO6J2wLNcrPgZJ+k7Eeq nrTZJukYZmto9CPn9h1DQS+H+LqflUZMLuyefvX0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733269AbgA1O1L (ORCPT ); Tue, 28 Jan 2020 09:27:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:54746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733093AbgA1O1F (ORCPT ); Tue, 28 Jan 2020 09:27:05 -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 B774720716; Tue, 28 Jan 2020 14:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221625; bh=PC0id2miedv7/wiSN1qvLDzT5fsZnx2ZkPMCamtFNYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=01SkfZxvjEV9ZHYfdCTluj+QTlMxZJ10WO5qUc0VUcCZhROC8HWin7fqaEa8kSzi3 d61xmA4DyOnwySElHnb7bUE154MhpaUF/Wi2q+Vcb16RpUxcO2hs5eTcfv65cMOncw ++mNgqoYtxG+RmWACrNkPy+8iJVi3Ghe7lQb7xyE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, William Dauchy , Nicolas Dichtel , "David S. Miller" Subject: [PATCH 4.19 09/92] net, ip_tunnel: fix namespaces move Date: Tue, 28 Jan 2020 15:07:37 +0100 Message-Id: <20200128135810.389478122@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 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: William Dauchy [ Upstream commit d0f418516022c32ecceaf4275423e5bd3f8743a9 ] in the same manner as commit 690afc165bb3 ("net: ip6_gre: fix moving ip6gre between namespaces"), fix namespace moving as it was broken since commit 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata."). Indeed, the ip6_gre commit removed the local flag for collect_md condition, so there is no reason to keep it for ip_gre/ip_tunnel. this patch will fix both ip_tunnel and ip_gre modules. Fixes: 2e15ea390e6f ("ip_gre: Add support to collect tunnel metadata.") Signed-off-by: William Dauchy Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ip_tunnel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -1203,10 +1203,8 @@ int ip_tunnel_init(struct net_device *de iph->version = 4; iph->ihl = 5; - if (tunnel->collect_md) { - dev->features |= NETIF_F_NETNS_LOCAL; + if (tunnel->collect_md) netif_keep_dst(dev); - } return 0; } EXPORT_SYMBOL_GPL(ip_tunnel_init);