From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] nft-shared: support native tcp port delinearize
Date: Sun, 16 Jan 2022 20:00:20 +0100 [thread overview]
Message-ID: <20220116190020.GA28638@breakpoint.cc> (raw)
In-Reply-To: <YeL2HLW+EpJPXII7@salvia>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > $ iptables-nft-save
> > -A INPUT -p tcp -m tcp --sport 12345
> > -A INPUT -p tcp -m tcp --sport 12345 --dport 6789
> > -A INPUT -p tcp -m tcp --sport 0:1023
> > -A INPUT -p tcp -m tcp --dport 1024:65535
>
> You can probably use the range expression, it has been there already
> for quite some time and it is slightly more efficient than two cmp
> expressions. nft still uses cmp for ranges for backward compatibility
> reasons (range support is available since 4.9 and -stable 4.4 enters
> EOL next month apparently), it only uses range for tcp dport != 0-1023.
Thanks for the hint, this was broken indeed, I reworked this to handle
exsiting range handling via two cmp expressions.
range sounds good, will add support for it too.
> > This would allow to extend iptables-nft to prefer
> > native payload expressions for --sport,dport in the future.
>
> Using the native payload for transport in the near future sounds a
> good idea to me.
Great, I will work on this once the reverse translation is working.
prev parent reply other threads:[~2022-01-16 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-15 15:03 [PATCH nft] nft-shared: support native tcp port delinearize Florian Westphal
2022-01-15 16:28 ` Pablo Neira Ayuso
2022-01-16 19:00 ` Florian Westphal [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=20220116190020.GA28638@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.