Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2488348ybg; Thu, 24 Oct 2019 10:25:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5VYKqOBMuYtCj6ozIowMakLFaUJJqD4Ktz+ZFWz7/Qrg2bTV/MT98Dgtf4dsRLjweTMCQ X-Received: by 2002:a17:906:c82e:: with SMTP id dd14mr30114547ejb.310.1571937945148; Thu, 24 Oct 2019 10:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571937945; cv=none; d=google.com; s=arc-20160816; b=UJaFl/YfGfZF3Yfl2MouEuZGf/XyMdvEbxHik+e11bcJDt+5QvR7LC5me91tYH7hkx WROtojtv2H8z98JBKOYosQ5sH3Im7XgyXhUgj7EZ7Dxzw+W9hbDPb6N9E7lTowTNGrCJ z+bz0J9I96tB8MhdBTSTwTpZiEwldDB3gqRPY1x7fConMrhcoUXu6aYJrKXLoEbQSV5c 1BcVVQssCxPVhXuuI82Ool1lvhi/K9rED+THxH65lSdky1uPK8SFwOFooZ54HRUrhfxG 7jaYeQovhrl7czjK2JlbP1it5c+vEd/us3k1HIEQu9Hb1QE3jGH4f1TXcRLTyTbkdVBY KmOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MpPX5ijiUFFkUnCoyy9Ewj1MKhfaP/Q2MZA7/kpwUEs=; b=ij7w3kvF3d4B1I0jY9kIFXcYPUtjkgG8FKV/fPVWpJ/dthcquJwrEnKYUa9aHTVEvo 0fmvDlAGPbeZIfLZT8upmDcc48AIwofURKOwx6Z09FVqjcvoJ8e8Vramy7MBES0KmQbn 5WYwU1eGJPiYfJurhzPzYZz8ivH1PVzzdKxMLlEE3jHxpvdHqWjeODs6XAoF+vdx2to3 9Oih87HHW/f/Q7SR8csgQ/omOeHXruX0U3Z0TdeUX2thVW4vmghKM/+X+WHzw0k9eyXM kWSaWoOKLXpP7bRfm/VQf9GOdTJBoyqhKLrPsoDWZB3IJeQaZTqN4IwDDya9xYeUyOuV v2TA== 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 e10si1098514ejk.416.2019.10.24.10.25.20; Thu, 24 Oct 2019 10:25:45 -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 S2390195AbfJXBMX (ORCPT + 99 others); Wed, 23 Oct 2019 21:12:23 -0400 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:60006 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388218AbfJXBMX (ORCPT ); Wed, 23 Oct 2019 21:12:23 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1iNRfm-0007Dj-Uy; Thu, 24 Oct 2019 03:12:18 +0200 Date: Thu, 24 Oct 2019 03:12:18 +0200 From: Florian Westphal To: praveen chaudhary Cc: Florian Westphal , davem@davemloft.net, kadlec@netfilter.org, pablo@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Zhenggen Xu , Andy Stracner Subject: Re: [PATCH] [netfilter]: Fix skb->csum calculation when netfilter manipulation for NF_NAT_MANIP_SRC\DST is done on IPV6 packet. Message-ID: <20191024011218.GT25052@breakpoint.cc> References: <1571857342-8407-1-git-send-email-pchaudhary@linkedin.com> <1571857342-8407-2-git-send-email-pchaudhary@linkedin.com> <20191023193337.GP25052@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org praveen chaudhary wrote: > inet_proto_csum_replace16 is called from many places, whereas this fix is > applicable only for nf_nat_ipv6_csum_update. where we need to update > skb->csum for ipv6 src/dst address change. Under which circumstances does inet_proto_csum_replace16 upate skb->csum correctly? > So, I added a new function. Basically, I used a safe approach to fix it, > without impacting other cases. Let me know other options, I am open to > suggestions. You seem to imply inet_proto_csum_replace16 is fine and only broken for ipv6 nat.