Received: by 10.223.164.221 with SMTP id h29csp548745wrb; Sat, 28 Oct 2017 03:34:52 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TAv4Q3HQXGMo9SRTbF1iYScPJ+onE54yIooGh/J71gEVOkJlHyZMh+vl5k/d4jyDM1SjF4 X-Received: by 10.84.160.226 with SMTP id v31mr2605141plg.302.1509186892268; Sat, 28 Oct 2017 03:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509186892; cv=none; d=google.com; s=arc-20160816; b=a3KFiKLUJSp02HkZwWDGn+b8OXDbw1Nb2L+haS2DtoFhXA+FfHSX0lC2KVrRHLofYi 74pfNCEWwJKE8A03vq6l2W8v2nRkyx1mHRtoWvRRmT2o4RZg2U2B218I8slXuEi0kS0/ Q4WTEMw8/ZEJCnDHLR0XYfzfpZuXCFGxgJIOp9eVWo2SkYVVUWEH1E/BoMgcsLiE1YQ1 XxRxz9VmlEz2beL04my3iI29DstW9VyWN/OvhjFN1vOL91q/220eV6oOM2pvUl8tiqC4 MGnhIRjMOQnrxcEzg9tQXmbKrszpZM/72FsuPY0Rcs+B5sGFEvk1rCqzR/9VodlKaJx3 E1/A== 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 :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=TY03P/FC0cjz82/uiaD8Wmh2jRRynrMSAmDM8j6Y7NI=; b=pvFQTsPZeJos19q+ysdN5xT09yi4EFYlU1RCPxwl9ykGkdaM4HfRfHNO35xBreUUAZ NPo4TJwLX153/oHaDEHTAMVwZEBV0HDS4E78cDASVMaDgjqO75WYtYZJ50Gpjaf/AN7f CIcyM+6tt0CGsU5K8baiorkGZJg90Dr38sHdPfIr/ZgC+ONDg8cXdXXhfTSfzUOtqIw9 hnhT/pjBKlX0SlovTbN8cH0ef+loBNvAl0NNoIGhajxjdMWJSOq4IsjcRMAVo6pwOiY7 qEESkqEJ/xBvZatoVBWcaS2FMzFj9Jd3BERyJHDOuWhjZpNgjLNynsL+FBmwSlhTJn4p MXqQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d26si5703428plj.369.2017.10.28.03.34.37; Sat, 28 Oct 2017 03:34:52 -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; 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 S1751286AbdJ1KeG (ORCPT + 99 others); Sat, 28 Oct 2017 06:34:06 -0400 Received: from ja.ssi.bg ([178.16.129.10]:46588 "EHLO ja.ssi.bg" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751001AbdJ1KeD (ORCPT ); Sat, 28 Oct 2017 06:34:03 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by ja.ssi.bg (8.15.2/8.15.2) with ESMTP id v9SAX90W005754; Sat, 28 Oct 2017 13:33:09 +0300 Date: Sat, 28 Oct 2017 13:33:09 +0300 (EEST) From: Julian Anastasov To: Ye Yin cc: "David S. Miller" , willemb@google.com, edumazet@google.com, johannes.berg@intel.com, dcaratti@redhat.com, pabeni@redhat.com, f.fainelli@gmail.com, fw@strlen.de, soheil@google.com, dwindsor@gmail.com, elena.reshetova@intel.com, tom@quantonium.net, Jason@zx2c4.com, linux-kernel , netdev@vger.kernel.org, Wei Zhou , Wensong Zhang , Simon Horman , lvs-devel@vger.kernel.org Subject: Re: [PATCH] netfilter/ipvs: clear ipvs_property flag when SKB net namespace changed In-Reply-To: <1509008225-19614-1-git-send-email-hustcat@gmail.com> Message-ID: References: <1509008225-19614-1-git-send-email-hustcat@gmail.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, 26 Oct 2017, Ye Yin wrote: > When run ipvs in two different network namespace at the same host, and one > ipvs transport network traffic to the other network namespace ipvs. > 'ipvs_property' flag will make the second ipvs take no effect. So we should > clear 'ipvs_property' when SKB network namespace changed. > > Signed-off-by: Ye Yin > Signed-off-by: Wei Zhou Patch looks good to me. ipvs_property was added long ago but skb_scrub_packet() is more recent (3.11), so: Fixes: 621e84d6f373 ("dev: introduce skb_scrub_packet()") Signed-off-by: Julian Anastasov I guess, DaveM can apply it directly as a bugfix to the net tree. > --- > include/linux/skbuff.h | 7 +++++++ > net/core/skbuff.c | 1 + > 2 files changed, 8 insertions(+) > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > index 72299ef..d448a48 100644 > --- a/include/linux/skbuff.h > +++ b/include/linux/skbuff.h > @@ -3770,6 +3770,13 @@ static inline void nf_reset_trace(struct sk_buff *skb) > #endif > } > > +static inline void ipvs_reset(struct sk_buff *skb) > +{ > +#if IS_ENABLED(CONFIG_IP_VS) > + skb->ipvs_property = 0; > +#endif > +} > + > /* Note: This doesn't put any conntrack and bridge info in dst. */ > static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src, > bool copy) > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 2465607..e140ba4 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -4864,6 +4864,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) > if (!xnet) > return; > > + ipvs_reset(skb); > skb_orphan(skb); > skb->mark = 0; > } > -- > 1.7.12.4 Regards -- Julian Anastasov From 1582309864763012413@xxx Thu Oct 26 08:57:58 +0000 2017 X-GM-THRID: 1582309864763012413 X-Gmail-Labels: Inbox,Category Forums