stream: clear SYN queue on state change

Bug: #5907.
pull/8784/head
Victor Julien 2 years ago
parent cb66a1e636
commit 62b998cc06

@ -1928,11 +1928,13 @@ static int StreamTcpPacketStateSynSent(
SCLogDebug("ssn->server.flags |= STREAMTCP_STREAM_FLAG_RST_RECV"); SCLogDebug("ssn->server.flags |= STREAMTCP_STREAM_FLAG_RST_RECV");
ssn->server.flags |= STREAMTCP_STREAM_FLAG_RST_RECV; ssn->server.flags |= STREAMTCP_STREAM_FLAG_RST_RECV;
StreamTcpCloseSsnWithReset(p, ssn); StreamTcpCloseSsnWithReset(p, ssn);
StreamTcp3wsFreeQueue(ssn);
} }
} else { } else {
ssn->client.flags |= STREAMTCP_STREAM_FLAG_RST_RECV; ssn->client.flags |= STREAMTCP_STREAM_FLAG_RST_RECV;
SCLogDebug("ssn->client.flags |= STREAMTCP_STREAM_FLAG_RST_RECV"); SCLogDebug("ssn->client.flags |= STREAMTCP_STREAM_FLAG_RST_RECV");
StreamTcpCloseSsnWithReset(p, ssn); StreamTcpCloseSsnWithReset(p, ssn);
StreamTcp3wsFreeQueue(ssn);
} }
/* FIN */ /* FIN */
@ -2043,6 +2045,7 @@ static int StreamTcpPacketStateSynSent(
ssn->flags |= STREAMTCP_FLAG_ASYNC; ssn->flags |= STREAMTCP_FLAG_ASYNC;
StreamTcpPacketSetState(p, ssn, TCP_ESTABLISHED); StreamTcpPacketSetState(p, ssn, TCP_ESTABLISHED);
SCLogDebug("ssn %p: =~ ssn state is now TCP_ESTABLISHED", ssn); SCLogDebug("ssn %p: =~ ssn state is now TCP_ESTABLISHED", ssn);
StreamTcp3wsFreeQueue(ssn);
ssn->client.window = TCP_GET_WINDOW(p); ssn->client.window = TCP_GET_WINDOW(p);
ssn->client.last_ack = TCP_GET_SEQ(p); ssn->client.last_ack = TCP_GET_SEQ(p);

Loading…
Cancel
Save