All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Cc: Balazs Gulacsi <m2gulbal@gmail.com>
Subject: Re: [iptables PATCH] extensions: libxt_conntrack: Fail on untranslatable state match
Date: Wed, 21 Oct 2026 12:17:25 +0200	[thread overview]
Message-ID: <atiRNbVh-1ELNyDX@orbyte.nwl.cc> (raw)
In-Reply-To: <20261008182605.257290-1-phil@nwl.cc>

On Thu, Oct 08, 2026 at 08:23:51PM +0200, Phil Sutter wrote:
> Iptables' conntrack match supports combined matching on ct->state bits
> as well as the NAT bits in ct->status. The kernel extension matches if
> any of the bits is set, i.e. '-m conntrack --ctstate NEW,DNAT' matches
> packets in either NEW state or DNAT status or both. Therefore,
> translating this sample match into 'ct status dnat ct state new' is
> wrong: The nftables rule matches only if both statements match.
> 
> The only way to achieve this in nftables seems to be by duplicating the
> rule which is not feasible within the xlate infrastructure. So instead
> just abort the translation.
> 
> This is a partial revert of commit 1a13277f88099 ("extensions:
> libxt_conntrack: Fix for ignored ctstates in translation") which turned
> an incomplete translation into an incorrect one.
> 
> Cc: Balazs Gulacsi <m2gulbal@gmail.com>
> Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1826
> Fixes: 26ec09bf6b9b6 ("extensions: libxt_conntrack: provide translation for DNAT and SNAT --ctstate")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Patch applied.

  reply	other threads:[~2026-10-21 10:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 18:23 [iptables PATCH] extensions: libxt_conntrack: Fail on untranslatable state match Phil Sutter
2026-10-21 10:17 ` Phil Sutter [this message]
2026-10-21 10:31   ` Pablo Neira Ayuso
2026-10-21 13:40     ` Phil Sutter

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=atiRNbVh-1ELNyDX@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=m2gulbal@gmail.com \
    --cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.