Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: "Ramsay, Lincoln" <Lincoln.Ramsay@digi.com>,
	"netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: cannot use != with ct status
Date: Wed, 14 Oct 2020 12:30:57 +0200	[thread overview]
Message-ID: <20201014103057.GA20717@salvia> (raw)
In-Reply-To: <alpine.DEB.2.23.453.2010141221380.6472@localhost>

Hi Jozsef,

On Wed, Oct 14, 2020 at 12:25:40PM +0200, Jozsef Kadlecsik wrote:
> On Wed, 14 Oct 2020, Pablo Neira Ayuso wrote:
> 
> > On Wed, Oct 14, 2020 at 04:16:40AM +0000, Ramsay, Lincoln wrote:
> > > Hi,
> > > 
> > > I've just confirmed that I can't make a rule that matches ct status != dnat.
> > 
> > ct status == dnat and ct state != dnat checks for _exact_ matching.
> > 
> > Then:
> > 
> >         ct status dnat
> > 
> > based on the datatype, provides a shortcut for
> > 
> >         ct status and dnat == dnat
> 
> Sorry, but it looks like really strange. "ct status nat" would be more 
> natural to me.

This is based on the ct status bits, so dnat is matching for
destination NAT updates (ie. IPS_DST_NAT). Then, snat is matching for
IPS_SRC_NAT.

It should be possible to add ct status nat but such nat would be
(IPS_SRC_NAT | IPS_DST_NAT)

  reply	other threads:[~2020-10-14 10:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  4:16 cannot use != with ct status Ramsay, Lincoln
2020-10-14 10:04 ` Pablo Neira Ayuso
2020-10-14 10:25   ` Jozsef Kadlecsik
2020-10-14 10:30     ` Pablo Neira Ayuso [this message]
2020-10-14 18:09       ` Jozsef Kadlecsik
2020-10-14 18:54         ` Pablo Neira Ayuso
2020-10-14 11:02     ` G.W. Haywood
2020-10-14 12:50       ` Pablo Neira Ayuso
2020-10-14 13:54         ` G.W. Haywood
2020-10-14 14:11           ` Pablo Neira Ayuso
2020-10-14 14:22             ` G.W. Haywood
2020-10-14 23:29   ` Ramsay, Lincoln

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=20201014103057.GA20717@salvia \
    --to=pablo@netfilter.org \
    --cc=Lincoln.Ramsay@digi.com \
    --cc=kadlec@netfilter.org \
    --cc=netfilter@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