Netdev List
 help / color / mirror / Atom feed
From: lvjunyu <lvjunyu@cmss.chinamobile.com>
To: netdev-bot+sashiko@kernel.org
Cc: pablo@netfilter.org, fw@strlen.de, phil@nwl.cc,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kuba@kernel.org, lvjunyu <lvjunyu@cmss.chinamobile.com>
Subject: Re: [PATCH] netfilter: nf_nat: Fix stale outer UDP checksum on VXLAN encapsulated packets
Date: Mon, 21 Sep 2026 21:01:51 +0800	[thread overview]
Message-ID: <20260921130151.686386-1-lvjunyu@cmss.chinamobile.com> (raw)
In-Reply-To: <178997694260.2160803.768338135360205258@kernel.org>

Thank you for the review.  Both High issues are legitimate.

1. Incomplete fix: nf_csum_update() indeed takes the pseudo-header
   branch for CHECKSUM_PARTIAL, applying the address delta with the
   wrong sign.  My test environment had delta=0 (masqueraded address
   equals the original), so this was not exposed.  The same applies
   to IPv6 via inet_proto_csum_replace16().

2. Wrong discriminator: skb->encapsulation cannot distinguish the LCO
   state (complete checksum, needs fixup) from the seed/offload state
   (pseudo-header seed, must not touch).  SCTP-over-UDP would be a
   false positive; L2TP-over-UDP a false negative.

I have prepared a v2 that:
  - Uses the offload target (csum_start + csum_offset != &hdr->check)
    to distinguish LCO from seed/offload state
  - Temporarily flips ip_summed to CHECKSUM_NONE so both the address
    and port updates use the csum_replace*() path
  - Updates the comment to describe both CHECKSUM_PARTIAL states

v2 will be submitted as a new thread shortly.




      reply	other threads:[~2026-09-22  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20  7:45 [PATCH] netfilter: nf_nat: Fix stale outer UDP checksum on VXLAN encapsulated packets lvjunyu
2026-09-21  7:49 ` netdev-bot+sashiko
2026-09-21 13:01   ` lvjunyu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260921130151.686386-1-lvjunyu@cmss.chinamobile.com \
    --to=lvjunyu@cmss.chinamobile.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox