1
0
mirror of https://github.com/bol-van/zapret.git synced 2025-05-24 22:32:58 +03:00

nfqws: set IP_NODEFRAG sockopt

This commit is contained in:
bol-van 2022-01-03 21:14:55 +03:00
parent e2ee331ff3
commit 94433e3279
9 changed files with 9 additions and 1 deletions
binaries
aarch64
arm
mips32r1-lsb
mips32r1-msb
mips64r2-msb
ppc
x86
x86_64
nfq

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.

@ -327,7 +327,6 @@ bool ip_frag4(
((struct ip*)pkt1)->ip_off = htons(IP_MF); ((struct ip*)pkt1)->ip_off = htons(IP_MF);
((struct ip*)pkt1)->ip_len = htons(hdrlen+frag_pos); ((struct ip*)pkt1)->ip_len = htons(hdrlen+frag_pos);
if (ident!=(uint32_t)-1) ((struct ip*)pkt1)->ip_id = (uint16_t)ident; if (ident!=(uint32_t)-1) ((struct ip*)pkt1)->ip_id = (uint16_t)ident;
*pkt1_size=hdrlen+frag_pos; *pkt1_size=hdrlen+frag_pos;
ip4_fix_checksum((struct ip *)pkt1); ip4_fix_checksum((struct ip *)pkt1);
@ -795,6 +794,15 @@ static int rawsend_socket_raw(int domain, int proto)
close(fd); close(fd);
return -1; 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; return fd;
} }