mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-23 14:53:18 +00:00
nfqws: move IP_NODEFRAG sockopt
This commit is contained in:
parent
94433e3279
commit
78de2c2137
@ -794,15 +794,6 @@ static int rawsend_socket_raw(int domain, int proto)
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
#ifdef __linux__
|
||||
int yes=1;
|
||||
if (setsockopt(fd,IPPROTO_IP,IP_NODEFRAG,&yes,sizeof(yes)) == -1)
|
||||
{
|
||||
perror("rawsend: setsockopt(IP_NODEFRAG)");
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
@ -863,6 +854,11 @@ static int rawsend_socket(sa_family_t family,uint32_t fwmark)
|
||||
perror("rawsend: setsockopt(SO_PRIORITY)");
|
||||
goto exiterr;
|
||||
}
|
||||
if (setsockopt(*sock, IPPROTO_IP, IP_NODEFRAG, &yes, sizeof(yes)) == -1)
|
||||
{
|
||||
perror("rawsend: setsockopt(IP_NODEFRAG)");
|
||||
goto exiterr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return *sock;
|
||||
|
Loading…
Reference in New Issue
Block a user