public inbox for netfilter-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Chloro Dose <chlorodose@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] src: Export nftnl_set_clone symbol
Date: Thu, 19 Mar 2026 09:56:40 +0100	[thread overview]
Message-ID: <abu6SAYnM6SJfXMv@orbyte.nwl.cc> (raw)
In-Reply-To: <CALUf4NpY__xsCa4=RHw-D+Hixvnj_1yuS7K_qJ6WJ0qSoTyRDg@mail.gmail.com>

Hi Chloro,

On Thu, Mar 19, 2026 at 08:15:35AM +0800, Chloro Dose wrote:
> I have a use case where I want to construct a daemon that keeps a
> reference to an nft_set and repeatedly uses it to handle requests to
> add elems. I assume I must clone the nft_set from a clean copy each
> time, otherwise I'll resend all previous elements to the kernel. But
> I'm just starting to learn nftables, so I'm not sure my understanding
> is correct. Am I misunderstanding something here?

All you need to keep record of is the set's name and that of the table
it belongs to as well as the latter's family. With this data you may
generate a NFT_MSG_NEWSETELEM-type message for the kernel to add one or
many elements to an existing set. For reference, mnl_nft_setelem_batch()
in nftables.git/src/mnl.c should be a good example of how to do this
using libnftnl and libmnl.

Cheers, Phil

      reply	other threads:[~2026-03-19  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18  2:56 [PATCH] src: Export nftnl_set_clone symbol chlorodose
2026-03-18 10:46 ` Phil Sutter
2026-03-18 17:03   ` Pablo Neira Ayuso
2026-03-18 18:53     ` Phil Sutter
2026-03-19  0:15       ` Chloro Dose
2026-03-19  8:56         ` Phil Sutter [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=abu6SAYnM6SJfXMv@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=chlorodose@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox