public inbox for netfilter-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: chlorodose <chlorodose@gmail.com>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] src: Export nftnl_set_clone symbol
Date: Wed, 18 Mar 2026 19:53:14 +0100	[thread overview]
Message-ID: <abr0mqg2A0V0DiWb@orbyte.nwl.cc> (raw)
In-Reply-To: <abra_o50miSi49Aw@chamomile>

On Wed, Mar 18, 2026 at 06:03:58PM +0100, Pablo Neira Ayuso wrote:
> On Wed, Mar 18, 2026 at 11:46:14AM +0100, Phil Sutter wrote:
> > Hi chlorodose,
> > 
> > On Wed, Mar 18, 2026 at 10:56:51AM +0800, chlorodose wrote:
> > > Seems that nftnl_set_clone is forgot to be exported, we add it back.
> > > 
> > > Signed-off-by: chlorodose <chlorodose@gmail.com>
> > > ---
> > >  src/set.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/src/set.c b/src/set.c
> > > index 54674bc..e5e51b6 100644
> > > --- a/src/set.c
> > > +++ b/src/set.c
> > > @@ -360,6 +360,7 @@ uint64_t nftnl_set_get_u64(const struct nftnl_set *s, uint16_t attr)
> > >  	return val ? *val : 0;
> > >  }
> > >  
> > > +EXPORT_SYMBOL(nftnl_set_clone);
> > >  struct nftnl_set *nftnl_set_clone(const struct nftnl_set *set)
> > >  {
> > >  	struct nftnl_set *newset;
> > 
> > Don't you also have to add it to src/libnftnl.map? How did you test this
> > patch?
> > 
> > Looking at the function itself, I fear the code is not correct anymore.
> > E.g., it does not clone expr_list or user.data. If I was to decide, I'd
> > rather drop it entirely instead of polishing it up. What's your
> > use-case?
> 
> Indeed, this function is internal and it is incomplete. it does not
> provide a full clone.

I don't see it called inside libnftnl, though. Ah, it seems to have been
used by the JSON API dropped in commit 80077787f8f21 ("src: remove json
support"). And since we did not export it yet, we're safe to drop it
unless chlorodose has a proper use-case for it.

Cheers, Phil

  reply	other threads:[~2026-03-18 18:53 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 [this message]
2026-03-19  0:15       ` Chloro Dose
2026-03-19  8:56         ` Phil Sutter

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=abr0mqg2A0V0DiWb@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