Userspace: handle --no-ipv6 for PF_INET6 UNBIND/BIND_PF

This commit is contained in:
Vadim Vetrov 2024-10-27 00:09:45 +03:00
parent 93972f8404
commit ae9592c71f
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -497,6 +497,7 @@ int init_queue(int queue_num) {
goto die;
}
if (config.use_ipv6) {
nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num);
nfq_nlmsg_cfg_put_cmd(nlh, PF_INET6, NFQNL_CFG_CMD_PF_UNBIND);
@ -512,6 +513,7 @@ int init_queue(int queue_num) {
perror("mnl_socket_send");
goto die;
}
}
/* End of support for kernel versions < 3.8 */
nlh = nfq_nlmsg_put(buf, NFQNL_MSG_CONFIG, queue_num);