From: "Marek Küthe" <m-k-mailling-list@mk16.de>
To: netfilter@vger.kernel.org
Subject: Re: IPv4 Evil Bit
Date: Thu, 8 Jun 2023 09:51:38 +0200 [thread overview]
Message-ID: <20230608095138.409d3303@parrot> (raw)
In-Reply-To: <20230607143019.65e7f5ec1a21db391071a4d4@plushkava.net>
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
On Wed, 7 Jun 2023 14:30:19 +0100
Kerin Millar <kfm@plushkava.net> wrote:
> On Wed, 7 Jun 2023 13:17:43 +0200
> Marek Küthe <m-k-mailling-list@mk16.de> wrote:
>
> > Hello,
> >
> > I hope I am in the right place. I have two questions about nftables:
> >
> > 1) Is it possible to perform OR operations in nftables? For example
> > `ip6 saddr ::/128 OR ip saddr 127.0.0.1/8 accept;` As far as I
> > understand it, everything else is concatenated with AND.
>
> No. Nor would a set suffice, as ipv4_addr and ipv6_addr elements cannot be mixed.
Too bad nftables doesn't have something like that.
>
> >
> > 2) I want to see how many IPv4 packets I can get with the Evil Bit
> > (RFC3514). Since there seems to be no native function for this in
> > nftables, I seem to have to use raw payload expression. So I have
> > set up the following:
> >
> > @th,6,1 & 0x80 = 0x80 \
> > log prefix "[nftables] Evil bit: " counter reject;
> >
> > However, `Error: syntax error, unexpected '='` appears. What is the
> > reason for this? How can I formulate this expression correctly?
>
> Try @nh,48,8 & 0x80 == 0x80. The offset and length values are expressed in bits, not bytes.
Thanks a lot! This works.
>
> --
> Kerin Millar
--
Marek Küthe
m.k@mk16.de
er/ihm he/him
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-06-08 7:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 11:17 IPv4 Evil Bit Marek Küthe
2023-06-07 13:30 ` Kerin Millar
2023-06-08 7:51 ` Marek Küthe [this message]
2023-06-08 8:03 ` Florian Westphal
2023-06-07 14:38 ` Paul Robert Marino
2023-06-08 7:58 ` Marek Küthe
2023-06-08 8:07 ` Kerin Millar
2023-06-08 9:56 ` Paul Robert Marino
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=20230608095138.409d3303@parrot \
--to=m-k-mailling-list@mk16.de \
--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