netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Andrii Melnychenko <a.melnychenko@vyos.io>,
	kadlec@netfilter.org, phil@nwl.cc, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] nft_ct: Added nfct_seqadj_ext_add() for NAT'ed conntrack.
Date: Wed, 22 Oct 2025 13:14:23 +0200	[thread overview]
Message-ID: <aPi8h_Ervgips4X4@strlen.de> (raw)
In-Reply-To: <aPghQ2-QVkeNgib1@calendula>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > so client will eventually retransmit the connection request.
> > 
> > I can also mangle this locally, let me know.
> 
> BTW, this fixes DNAT case, but SNAT case is still broken because flag
> is set at a later stage, right?

Hmm, why?  nf_nat_setup_info() will add seqadj extension if a helper
is assigned.  I only see two nat cases:

The helper is assigned, no NAT was requested.

Then, in postrouting, a NAT rule gets triggered.
nf_nat_setup_info() will add the seqadj extension for us.

This case doesn't need this patch.  Broken scenario:

NAT rule gets triggered, no helper is assigned yet.
Then, 'helper set foo' rule gets triggered.

This case missed the seqadj extension add.

An alternative would be to reject 'helper set foo' rule add unless the
expression is called from prerouting or output with a priority that is
after conntrack but before nat.

But its more risky change, it would surely break some setups.

  reply	other threads:[~2025-10-22 11:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 13:39 [PATCH v3 0/1] nf_conntrack_ftp: Added nfct_seqadj_ext_add() Andrii Melnychenko
2025-10-21 13:39 ` [PATCH v3 1/1] nft_ct: Added nfct_seqadj_ext_add() for NAT'ed conntrack Andrii Melnychenko
2025-10-21 14:34   ` Florian Westphal
2025-10-21 16:24     ` Andrii Melnychenko
2025-10-21 16:34       ` Florian Westphal
2025-10-22  0:11     ` Pablo Neira Ayuso
2025-10-22 11:14       ` Florian Westphal [this message]
2025-10-22 13:01         ` Andrii Melnychenko
2025-10-23 12:28           ` Andrii Melnychenko
2025-10-23 12:42             ` Florian Westphal
2025-10-24 12:26               ` Andrii Melnychenko
2025-10-24 12:58                 ` Florian Westphal
2025-10-21 14:35 ` [PATCH v3 0/1] nf_conntrack_ftp: Added nfct_seqadj_ext_add() Florian Westphal

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=aPi8h_Ervgips4X4@strlen.de \
    --to=fw@strlen.de \
    --cc=a.melnychenko@vyos.io \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /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;
as well as URLs for NNTP newsgroup(s).