bugzilla-daemon at netfilter.org
2023-Jun-30 05:57 UTC
[Bug 1690] New: Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 Bug ID: 1690 Summary: Set clone functions not exported. Product: libnftnl Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P5 Component: libnftnl Assignee: pablo at netfilter.org Reporter: bugs at phlexo.com When trying to compile a program which uses the nftnl_set_clone, or nftnl_set_elem_clone functions, the linker fails with an undefined reference error. -- 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/20230630/aedb75cb/attachment.html>
bugzilla-daemon at netfilter.org
2023-Jun-30 06:11 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 Phil S <bugs at phlexo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugs at phlexo.com -- 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/20230630/babb16a6/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-02 19:51 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 --- Comment #1 from Phil S <bugs at phlexo.com> --- Here's a patch which fixes the issue. I tried to add it as an attachment but it responds with a 403 Forbidden. --- src/set.c +++ src/set.c @@ -352,6 +352,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; --- src/set_elem.c +++ src/set_elem.c @@ -278,6 +278,7 @@ uint64_t nftnl_set_elem_get_u64(struct nftnl_set_elem *s, uint16_t attr) return val; } +EXPORT_SYMBOL(nftnl_set_elem_clone); struct nftnl_set_elem *nftnl_set_elem_clone(struct nftnl_set_elem *elem) { struct nftnl_set_elem *newelem; -- 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/20240802/cb54a5bc/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-02 19:54 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 --- Comment #2 from Phil S <bugs at phlexo.com> --- The first EXPORT is missing the semicolon, sorry! -- 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/20240802/63ca2560/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-02 20:03 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 --- Comment #3 from Pablo Neira Ayuso <pablo at netfilter.org> --- why do you need this? -- 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/20240802/9814df33/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-02 20:11 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 --- Comment #4 from Pablo Neira Ayuso <pablo at netfilter.org> --- BTW, I can reproduce the bugzilla 404 issue, we are looking at this issue too -- 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/20240802/b2651d7b/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-02 20:12 UTC
[Bug 1690] Set clone functions not exported.
https://bugzilla.netfilter.org/show_bug.cgi?id=1690 --- Comment #5 from Pablo Neira Ayuso <pablo at netfilter.org> --- (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. -- 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/20240802/937a88e7/attachment.html>
bugzilla-daemon at netfilter.org
2024-Aug-03 01:21 UTC
[Bug 1690] Set clone functions not exported.
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>