mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-19 21:42:59 +03:00
nfqws: add nfq_bind_pf(AF_INET6) for kernels <3.7
This commit is contained in:
parent
0efc4f7b24
commit
1978e8f4ab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
nfq/nfqws.c
10
nfq/nfqws.c
@ -517,12 +517,22 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "error during nfq_unbind_pf()\n");
|
||||
goto exiterr;
|
||||
}
|
||||
printf("unbinding existing nf_queue handler for AF_INET6 (if any)\n");
|
||||
if (nfq_unbind_pf(h, AF_INET6) < 0) {
|
||||
fprintf(stderr, "error during nfq_unbind_pf()\n");
|
||||
// ignore error. system can be without ipv6
|
||||
}
|
||||
|
||||
printf("binding nfnetlink_queue as nf_queue handler for AF_INET\n");
|
||||
if (nfq_bind_pf(h, AF_INET) < 0) {
|
||||
fprintf(stderr, "error during nfq_bind_pf()\n");
|
||||
goto exiterr;
|
||||
}
|
||||
printf("binding nfnetlink_queue as nf_queue handler for AF_INET6\n");
|
||||
if (nfq_bind_pf(h, AF_INET6) < 0) {
|
||||
fprintf(stderr, "error during nfq_bind_pf()\n");
|
||||
// ignore error. system can be without ipv6
|
||||
}
|
||||
|
||||
printf("binding this socket to queue '%u'\n", params.qnum);
|
||||
qh = nfq_create_queue(h, params.qnum, &cb, ¶ms);
|
||||
|
Loading…
x
Reference in New Issue
Block a user