libnfnetlink dependency elimination
cover libnfnetlink dependency elimination
Hi Pablo,
This is the first step towards moving to 100% libmnl use.
AFAICS these 2 funtions just have to go otherwise we are stuck with libnfnetlink for ever.
Cheers ... Duncan.
Duncan Roe (1):
Retire 2 libnfnetlink-specific functions
.gitignore | 1 + include/libnetfilter_queue/libnetfilter_queue.h | 2 -- src/libnetfilter_queue.c | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.35.8
PATCH 1/1 Retire 2 libnfnetlink-specific functions
Remove nfq_nfnlh() and nfq_open_nfnl() from public access.
As outlined near the foot of
https://www.spinics.net/lists/netfilter-devel/msg82762.html,nfq_open_nfnl() and nfq_nfnlh() are "problematic" to move to libmnl.
These functions are only of use to users writing libnfnetlink programs, and libnfnetlink is going away.
--- .gitignore | 1 + include/libnetfilter_queue/libnetfilter_queue.h | 2 -- src/libnetfilter_queue.c | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-)
.gitignore +1 -0
@@ -19,6 +19,7 @@ Makefile.in /libnetfilter_queue.pc /examples/nf-queue +/examples/nfq6 /doxygen/doxyfile.stamp /doxygen/html/ /doxygen/man/
include/libnetfilter_queue/libnetfilter_queue.h +0 -2
@@ -28,7 +28,6 @@ struct nfq_data;extern int nfq_errno; -extern struct nfnl_handle *nfq_nfnlh (struct nfq_handle *h);extern int nfq_fd (struct nfq_handle *h); typedef int nfq_callback(struct nfq_q_handle *gh, struct nfgenmsg *nfmsg,
@@ -36,7 +35,6 @@ typedef int nfq_callback(struct nfq_q_handle *gh, struct nfgenmsg *nfmsg,extern struct nfq_handle *nfq_open (void ); -extern struct nfq_handle *nfq_open_nfnl (struct nfnl_handle *nfnlh);extern int nfq_close (struct nfq_handle *h);extern int nfq_bind_pf (struct nfq_handle *h,uint16_t pf);
src/libnetfilter_queue.c +3 -2
@@ -237,9 +237,11 @@ static int __nfq_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[],return qh->cb (qh, nfmsg, &nfqa, qh->data); } +static struct nfq_handle *nfq_open_nfnl (struct nfnl_handle *nfnlh); +static struct nfnl_handle *nfq_nfnlh (struct nfq_handle *h); +/* public interface */ -EXPORT_SYMBOL struct nfnl_handle *nfq_nfnlh (struct nfq_handle *h) {return h->nfnlh;
@@ -413,7 +415,6 @@ struct nfq_handle *nfq_open(void)* * \return a pointer to a new queue handle or NULL on failure. */ -EXPORT_SYMBOL struct nfq_handle *nfq_open_nfnl (struct nfnl_handle *nfnlh) {struct nfnl_callback pkt_cb = {
Signature · 1 line
2.35.8
Pablo Neira Ayuso
maintainerRe: [PATCH libnetfilter_queue 1/1] Retire 2 libnfnetlink-specific functions
Quoted 8 lines · Duncan Roe
Remove
nfq_nfnlh()andnfq_open_nfnl()from public access.As outlined near the foot of
https://www.spinics.net/lists/netfilter-devel/msg82762.html,nfq_open_nfnl()andnfq_nfnlh()are "problematic" to move to libmnl.These functions are only of use to users writing libnfnetlink programs, and libnfnetlink is going away.
This is the last thing, first this API needs to be adapted to use libmnl.
Re: [PATCH libnetfilter_queue 1/1] Retire 2 libnfnetlink-specific functions
Quoted 7 lines · Pablo Neira Ayuso
Quoted 6 lines · Duncan Roe
Remove
nfq_nfnlh()andnfq_open_nfnl()from public access.As outlined near the foot of
https://www.spinics.net/lists/netfilter-devel/msg82762.html,nfq_open_nfnl()andnfq_nfnlh()are "problematic" to move to libmnl.
Quoted 5 lines
Quoted 2 lines
These functions are only of use to users writing libnfnetlink programs, and libnfnetlink is going away.
This is the last thing, first this API needs to be adapted to use libmnl.
Yes, you can apply the patch any time - I just wanted to make sure it was acceptable.
Could you in the meantime please apply
https://patchwork.ozlabs.org/project/netfilter-devel/patch/[email protected]/
(canonical whitespace in headers) before it gets forgottten?
Cheers ... Duncan.