From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Kerin Millar <kfm@plushkava.net>
Cc: "Lars Noodén" <lars.nooden@gmx.com>,
"Linux Netfilter Users List" <netfilter@vger.kernel.org>
Subject: Re: Dynamically appending addresses to a named set
Date: Wed, 12 Mar 2025 20:48:01 +0100 [thread overview]
Message-ID: <Z9Hk8SsJwZArWo9C@calendula> (raw)
In-Reply-To: <34c26829-a535-43b5-accd-884f4acd0614@app.fastmail.com>
On Wed, Mar 12, 2025 at 07:44:25PM +0000, Kerin Millar wrote:
> On Wed, 12 Mar 2025, at 4:08 PM, Lars Noodén wrote:
> > Hello,
> >
> > In NFTables, I have created a named set called 'bar' in the chain input
> > in the table foo. I can add elements to the set manually,
> >
> > # nft add element ip foo bar { 192.168.2.2 }
> >
> > However, I am not able to guess the syntax to have a regular NFTables
> > rule do the appending automatically. I've tried a lot of permutations
> > of the following, but always with fatal errors,
> >
> > # nft add rule foo input tcp dport 22 counter add @bar { ip saddr }
> > Error: Could not process rule: Operation not supported
> > add rule foo input tcp dport 22 counter add @bar { ip saddr }
>
> For the kernel to raise ENOTSUP does not indicate an error of syntax. The bytecode intended for the nftables VM will already have been compiled at this point.
>
> I suspect that your set has been declared with the "interval" flag in effect, in which case updates from the packet path are not allowed. As far as I can tell, this constraint is undocumented.
Maybe Lars forgot to set on the flags dynamic;
Where is you set declaration?
next prev parent reply other threads:[~2025-03-12 19:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 16:08 Dynamically appending addresses to a named set Lars Noodén
2025-03-12 19:44 ` Kerin Millar
2025-03-12 19:48 ` Pablo Neira Ayuso [this message]
2025-03-12 21:50 ` Kerin Millar
2025-03-12 22:06 ` Pablo Neira Ayuso
2025-03-13 4:31 ` Lars Noodén
2025-03-13 8:59 ` Pablo Neira Ayuso
2025-03-14 6:12 ` Lars Noodén
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=Z9Hk8SsJwZArWo9C@calendula \
--to=pablo@netfilter.org \
--cc=kfm@plushkava.net \
--cc=lars.nooden@gmx.com \
--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