diff mbox series

[libnetfilter_queue,v2] src: Delete code not needed since Linux 3.8 in examples/nf-queue.c

Message ID 20191126102546.6751-1-duncan_roe@optusnet.com.au
State Accepted
Delegated to: Pablo Neira
Headers show
Series [libnetfilter_queue,v2] src: Delete code not needed since Linux 3.8 in examples/nf-queue.c | expand

Commit Message

Duncan Roe Nov. 26, 2019, 10:25 a.m. UTC
The removed code sent configuration commands NFQNL_CFG_CMD_PF_UNBIND &
NFQNL_CFG_CMD_PF_BIND which the kernel required prior to 3.8.

Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
 examples/nf-queue.c | 17 -----------------
 1 file changed, 17 deletions(-)

Comments

Pablo Neira Ayuso Nov. 26, 2019, 10:44 a.m. UTC | #1
On Tue, Nov 26, 2019 at 09:25:46PM +1100, Duncan Roe wrote:
> The removed code sent configuration commands NFQNL_CFG_CMD_PF_UNBIND &
> NFQNL_CFG_CMD_PF_BIND which the kernel required prior to 3.8.

Applied, thanks.
diff mbox series

Patch

diff --git a/examples/nf-queue.c b/examples/nf-queue.c
index f6d254a..960e244 100644
--- a/examples/nf-queue.c
+++ b/examples/nf-queue.c
@@ -150,23 +150,6 @@  int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
-	/* PF_(UN)BIND is not needed with kernels 3.8 and later */
-	nlh = nfq_hdr_put(buf, NFQNL_MSG_CONFIG, 0);
-	nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_PF_UNBIND);
-
-	if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
-		perror("mnl_socket_send");
-		exit(EXIT_FAILURE);
-	}
-
-	nlh = nfq_hdr_put(buf, NFQNL_MSG_CONFIG, 0);
-	nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_PF_BIND);
-
-	if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
-		perror("mnl_socket_send");
-		exit(EXIT_FAILURE);
-	}
-
 	nlh = nfq_hdr_put(buf, NFQNL_MSG_CONFIG, queue_num);
 	nfq_nlmsg_cfg_put_cmd(nlh, AF_INET, NFQNL_CFG_CMD_BIND);