nfqws: do not reset conntrack entry in SYN state

This commit is contained in:
bol-van 2021-03-21 10:39:52 +03:00
parent 9dfbb91651
commit 0c76290440

View File

@ -126,12 +126,12 @@ static void ConntrackFeedPacket(t_ctrack *t, bool bReverse, const struct tcphdr
uint8_t scale; uint8_t scale;
if (tcp_syn_segment(tcphdr)) if (tcp_syn_segment(tcphdr))
{ {
ConntrackInitTrack(t); // erase current entry if (t->state!=SYN) ConntrackInitTrack(t); // erase current entry
t->seq0 = htonl(tcphdr->th_seq); t->seq0 = htonl(tcphdr->th_seq);
} }
else if (tcp_synack_segment(tcphdr)) else if (tcp_synack_segment(tcphdr))
{ {
ConntrackInitTrack(t); // erase current entry if (t->state!=SYN) ConntrackInitTrack(t); // erase current entry
if (!t->seq0) t->seq0 = htonl(tcphdr->th_ack)-1; if (!t->seq0) t->seq0 = htonl(tcphdr->th_ack)-1;
t->ack0 = htonl(tcphdr->th_seq); t->ack0 = htonl(tcphdr->th_seq);
} }