All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: "Maciej Żenczykowski" <zenczykowski@gmail.com>,
	"Netfilter Development Mailinglist"
	<netfilter-devel@vger.kernel.org>
Subject: Re: does nft 'tcp option ... exists' work?
Date: Mon, 4 Dec 2023 11:48:31 +0100	[thread overview]
Message-ID: <ZW2ufym+r10rESua@calendula> (raw)
In-Reply-To: <20231204094351.GC5972@breakpoint.cc>

On Mon, Dec 04, 2023 at 10:43:51AM +0100, Florian Westphal wrote:
> Florian Westphal <fw@strlen.de> wrote:
> > Maciej Żenczykowski <zenczykowski@gmail.com> wrote:
> > > FYI, I upgraded the router to OpenWrt 23.05.2 with 5.15.137 and it
> > > doesn't appear to have changed anything, ie. 'tcp option fastopen
> > > exists' still does not appear to match.
> > > 
> > > Also note that I'm putting this in table inet filter postrouting like
> > > below... but that shouldn't matter should it?
> > 
> > No, this is an endianess bug, on BE the compared byte is always 0.
> 
> We could fix this from userspace too:
> 
> ... exists  -> reg32 != 0
> ... missing -> reg32 == 0
> 
> currently nftables uses &boolean_type, so the
> compare is for 1 byte.  We could switch this to
> 32 bit integer type, this way it will no longer
> matter if the kernel stores the number at offset 0 or 3.

This simplifies things.

> Phil, Pablo, what do you think?

Just make sure this does not break backward compatibility. When used
from set declarations with typeof, for example.

  reply	other threads:[~2023-12-04 10:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 12:24 does nft 'tcp option ... exists' work? Maciej Żenczykowski
2023-12-03 12:50 ` Maciej Żenczykowski
2023-12-03 13:13   ` Florian Westphal
2023-12-04  9:43     ` Florian Westphal
2023-12-04 10:48       ` Pablo Neira Ayuso [this message]
2023-12-04 12:38         ` Maciej Żenczykowski
2023-12-04 13:01           ` Florian Westphal
2023-12-04 13:20             ` Maciej Żenczykowski
2023-12-04 13:33               ` Florian Westphal
2023-12-04 23:01                 ` Maciej Żenczykowski
2023-12-05  1:00                   ` [PATCH nft] parser: tcpopt: fix tcp option parsing with NUM + length field Florian Westphal
2023-12-05 11:44                     ` Pablo Neira Ayuso

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=ZW2ufym+r10rESua@calendula \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=zenczykowski@gmail.com \
    /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.