Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1954992imm; Thu, 24 May 2018 03:33:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqwKpohLc62Qo8lu0FEkJQ0vua/g3OGD0ZQOx5rmZ1kLBU3IN1n1RBCw20GGe2nxfi6gZoe X-Received: by 2002:a62:f619:: with SMTP id x25-v6mr6636239pfh.106.1527157997711; Thu, 24 May 2018 03:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157997; cv=none; d=google.com; s=arc-20160816; b=z6teJXJwPjFa2ANDYKvPjZt9ZAGe+Cka1ITwYj93ENLoO9+JcHJqhXj5ycmseZjcvf eAc5arEbSNsrHAMw6faVAginIo9JPZV/Va4kzeBtKUpnhkOxbyfJ64bPMZw6XpTz3z6S LQK4hSlzUoOspvK+ThN7baItdGcdmMj8HSj3tuToPGucOGAOe4wf++3Md9fPCbT+1guF ofPiEVokSauEWO0bcZXJ5cxe1TR9YW+DYIkLlfAOOrx2s4vuRJCDfDTlPz5uaB/phqJa mpLG79piu5VExBN+6d3jppE9dbpTG5qL8WDwVt7YKw0dI0+76qsRGRN9GdUi5Svmoqhh Yvpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Hkj8cA0eOyx8iQFIqB+A9QQ5Y0E2gEUDBcr9/BpmoZA=; b=Gl7pfgai6zn+V/ZFTmJERf0WwNcGiSyeMahagnn7w9796Un/1LDdluiHuhVgupv6GY hjyPtuseqlfgyTA/dRiBehkGie07k4shcZ9FkNtX7o0oA0dx7WF2qAVM2fD4xDAtNpZy YGo0q+FyFYGubDDWBDWv8HWO8EryZ56pTbar7+Xg95arfDMBt76WhUlEvE7z2J85PPO+ m94yCWUnPFHAZeETmzE6PGAKFwvVkKD1RVqo42M8ltiaeJwpsOATsYLTOnHUz8Pf0eLP 9mzewAi1xKlJYM0Sh0JJtX8LVlo1zw1tiPe+N3mWiLJ47HfOAcsmk8riAeg//QVFghsf Gztg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SfH7rhtf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si16355933pgc.251.2018.05.24.03.33.02; Thu, 24 May 2018 03:33:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SfH7rhtf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032153AbeEXKbO (ORCPT + 99 others); Thu, 24 May 2018 06:31:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:45910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030882AbeEXKBJ (ORCPT ); Thu, 24 May 2018 06:01:09 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 8EE122088E; Thu, 24 May 2018 10:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156069; bh=5ykpohkHQddfSU48Vc/AaWuEYQEi7AsATB2OUiHGYu0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SfH7rhtfeKfRXMC2tpnE+LygrnaGMs7mHSZWwLLz4uWv03nmnLdgHUiQbWkCpqg3W qzth/yvRDQ8l4Lys/ZLvtg5cKgyJUqkE90Yw5xKGfisO3gJl4ng8vAdwzyckdfX32E jCLvSaovWKPmaXHEtcx0D8Tg2lL1C4hNnomBCEao= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Machata , William Tu , "David S. Miller" Subject: [PATCH 4.16 025/161] net: ip6_gre: Split up ip6gre_tnl_change() Date: Thu, 24 May 2018 11:37:30 +0200 Message-Id: <20180524093021.371976848@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Machata [ Upstream commit a6465350ef495f5cbd76a3e505d25a01d648477e ] Split a reusable function ip6gre_tnl_copy_tnl_parm() from ip6gre_tnl_change(). This will allow ERSPAN-specific code to reuse the common parts while customizing the behavior for ERSPAN. Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support") Signed-off-by: Petr Machata Acked-by: William Tu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/ip6_gre.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -1106,8 +1106,8 @@ static void ip6gre_tnl_link_config(struc ip6gre_tnl_link_config_route(t, set_mtu, ip6gre_calc_hlen(t)); } -static int ip6gre_tnl_change(struct ip6_tnl *t, - const struct __ip6_tnl_parm *p, int set_mtu) +static void ip6gre_tnl_copy_tnl_parm(struct ip6_tnl *t, + const struct __ip6_tnl_parm *p) { t->parms.laddr = p->laddr; t->parms.raddr = p->raddr; @@ -1123,6 +1123,12 @@ static int ip6gre_tnl_change(struct ip6_ t->parms.o_flags = p->o_flags; t->parms.fwmark = p->fwmark; dst_cache_reset(&t->dst_cache); +} + +static int ip6gre_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p, + int set_mtu) +{ + ip6gre_tnl_copy_tnl_parm(t, p); ip6gre_tnl_link_config(t, set_mtu); return 0; }