[Bug 1690] Set clone functions not exported.
bugzilla-daemon at netfilter.org
bugzilla-daemon at netfilter.org
Sat Aug 3 03:21:13 CEST 2024
https://bugzilla.netfilter.org/show_bug.cgi?id=1690
--- Comment #6 from Phil S <bugs at phlexo.com> ---
(In reply to Pablo Neira Ayuso from comment #5)
> (In reply to Pablo Neira Ayuso from comment #3)
> > why do you need this?
>
> I mean: We currently export function whose primary users are netfilter.org
> projects, why do you need this clone function?
>
> Thanks.
I'm working on a project which uses libnftnl to dynamically make changes to
nftables as needed.
It wraps the objects in c++ classes using RAII to call the applicable alloc and
free functions. In the case of nftnl_set_elem objects, a clone is needed before
calling nftnl_set_elem because it will take ownership of the memory and result
in a double free.
I also have some nftnl_set objects for which I periodically populate the
elements via netlink and iterate them. It would be handy to be able to clone
the object before populating the elements so they don't have to be kept in
memory between updates.
I can add workarounds for the above if you're not comfortable exporting these
functions, but if that's the case they should probably be removed from
include/libnftnl/set.h instead?
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20240803/e5bae518/attachment-0001.html>
More information about the netfilter-buglog
mailing list