mirror of
https://github.com/bol-van/zapret.git
synced 2025-12-31 21:58:58 +03:00
freebsd dvtws respect freebsd14+ PF_DIVERT
This commit is contained in:
@@ -35,10 +35,6 @@
|
||||
#define NF_ACCEPT 1
|
||||
#endif
|
||||
|
||||
#ifndef IPPROTO_DIVERT
|
||||
#define IPPROTO_DIVERT 258
|
||||
#endif
|
||||
|
||||
#define CTRACK_T_SYN 60
|
||||
#define CTRACK_T_FIN 60
|
||||
#define CTRACK_T_EST 300
|
||||
@@ -357,7 +353,7 @@ static int dvt_main(void)
|
||||
bp4.sin_addr.s_addr = INADDR_ANY;
|
||||
|
||||
printf("creating divert4 socket\n");
|
||||
fd[0] = socket(AF_INET, SOCK_RAW, IPPROTO_DIVERT);
|
||||
fd[0] = rawsend_socket_divert(AF_INET);
|
||||
if (fd[0] == -1) {
|
||||
perror("socket (DIVERT4)");
|
||||
goto exiterr;
|
||||
@@ -382,7 +378,7 @@ static int dvt_main(void)
|
||||
bp6.sin6_port = htons(params.port);
|
||||
|
||||
printf("creating divert6 socket\n");
|
||||
fd[1] = socket(AF_INET6, SOCK_RAW, IPPROTO_DIVERT);
|
||||
fd[1] = rawsend_socket_divert(AF_INET6);
|
||||
if (fd[1] == -1) {
|
||||
perror("socket (DIVERT6)");
|
||||
goto exiterr;
|
||||
|
||||
Reference in New Issue
Block a user