Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream: improve 3whs completed by ACK with data #11824

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/stream-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2520,6 +2520,14 @@ static int StreamTcpPacketStateSynRecv(
StreamTcpPacketSetState(p, ssn, TCP_ESTABLISHED);
SCLogDebug("ssn %p: =~ ssn state is now TCP_ESTABLISHED", ssn);

/* special case: normally the packet following the 3whs is
* considered flow established, but with data we need it to
* be established now. This can happen if the original ACK was
* lost. */
if (p->payload_len) {
p->flowflags |= FLOW_PKT_ESTABLISHED;
}

StreamTcpReassembleHandleSegment(tv, stt->ra_ctx, ssn, &ssn->client, p);

/* If asynchronous stream handling is allowed then set the session,
Expand Down
Loading