summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Roe <duncan_roe@optusnet.com.au>2019-11-26 21:25:46 +1100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-11-26 11:45:52 +0100
commit7eaa79d583d6883da22af2b7dba1790d8aa62a90 (patch)
treea43f79191589bbe535735a383ff8690511024d4e
parent0b46c72d62ec596492e7277cea1b9f4fa6ed7078 (diff)
examples: Delete code not needed since Linux 3.8HEADmaster
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> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--examples/nf-queue.c17
1 files changed, 0 insertions, 17 deletions
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);