mirror of
https://github.com/bol-van/zapret.git
synced 2026-01-01 06:08:54 +03:00
nfqws: do not perform syndata desync if TCP fast open
This commit is contained in:
11
nfq/desync.c
11
nfq/desync.c
@@ -456,6 +456,17 @@ packet_process_result dpi_desync_tcp_packet(uint32_t fwmark, const char *ifout,
|
||||
return res;
|
||||
break;
|
||||
case DESYNC_SYNDATA:
|
||||
// make sure we are not breaking TCP fast open
|
||||
if (tcp_has_fastopen(tcphdr))
|
||||
{
|
||||
DLOG("received SYN with TCP fast open option. syndata desync is not applied.\n");
|
||||
break;
|
||||
}
|
||||
if (len_payload)
|
||||
{
|
||||
DLOG("received SYN with data payload. syndata desync is not applied.\n");
|
||||
break;
|
||||
}
|
||||
pkt1_len = sizeof(pkt1);
|
||||
if (!prepare_tcp_segment((struct sockaddr *)&src, (struct sockaddr *)&dst, flags_orig, tcphdr->th_seq, tcphdr->th_ack, tcphdr->th_win, scale_factor, timestamps,
|
||||
ttl_orig,0,0,0, params.fake_syndata,params.fake_syndata_size, pkt1,&pkt1_len))
|
||||
|
||||
Reference in New Issue
Block a user