|
|
|
|
@ -1263,6 +1263,7 @@ static int StreamTcpPacketStateNone(
|
|
|
|
|
if (stream_config.async_oneside) {
|
|
|
|
|
SCLogDebug("ssn %p: =~ ASYNC", ssn);
|
|
|
|
|
ssn->flags |= STREAMTCP_FLAG_ASYNC;
|
|
|
|
|
StatsCounterIncr(&tv->stats, stt->counter_tcp_async_stream);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** window scaling for midstream pickups, we can't do much other
|
|
|
|
|
@ -1363,6 +1364,7 @@ static int StreamTcpPacketStateNone(
|
|
|
|
|
if (stream_config.async_oneside) {
|
|
|
|
|
SCLogDebug("ssn %p: =~ ASYNC", ssn);
|
|
|
|
|
ssn->flags |= STREAMTCP_FLAG_ASYNC;
|
|
|
|
|
StatsCounterIncr(&tv->stats, stt->counter_tcp_async_stream);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* sequence number & window */
|
|
|
|
|
@ -1532,6 +1534,7 @@ static int StreamTcpPacketStateNone(
|
|
|
|
|
if (stream_config.async_oneside) {
|
|
|
|
|
SCLogDebug("ssn %p: =~ ASYNC", ssn);
|
|
|
|
|
ssn->flags |= STREAMTCP_FLAG_ASYNC;
|
|
|
|
|
StatsCounterIncr(&tv->stats, stt->counter_tcp_async_stream);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** window scaling for midstream pickups, we can't do much other
|
|
|
|
|
@ -2425,6 +2428,8 @@ static int StreamTcpPacketStateSynSent(
|
|
|
|
|
if (!stream_config.async_oneside)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
StatsCounterIncr(&tv->stats, stt->counter_tcp_async_stream);
|
|
|
|
|
|
|
|
|
|
/* we are in ASYNC (one side) mode now. */
|
|
|
|
|
|
|
|
|
|
/* one side async means we won't see a SYN/ACK, so we can
|
|
|
|
|
@ -5727,6 +5732,8 @@ int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt,
|
|
|
|
|
{
|
|
|
|
|
SCLogDebug("ssn %p: removing ASYNC flag as we have packets on both sides", ssn);
|
|
|
|
|
ssn->flags &= ~STREAMTCP_FLAG_ASYNC;
|
|
|
|
|
/* since the stream isn't really async, let's decrease the counter */
|
|
|
|
|
StatsCounterDecr(&tv->stats, stt->counter_tcp_async_stream);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -6210,6 +6217,7 @@ TmEcode StreamTcpThreadInit(ThreadVars *tv, void *initdata, void **data)
|
|
|
|
|
|
|
|
|
|
stt->counter_tcp_wrong_thread = StatsRegisterCounter("tcp.pkt_on_wrong_thread", &tv->stats);
|
|
|
|
|
stt->counter_tcp_ack_unseen_data = StatsRegisterCounter("tcp.ack_unseen_data", &tv->stats);
|
|
|
|
|
stt->counter_tcp_async_stream = StatsRegisterCounter("tcp.async_stream", &tv->stats);
|
|
|
|
|
|
|
|
|
|
/* init reassembly ctx */
|
|
|
|
|
stt->ra_ctx = StreamTcpReassembleInitThreadCtx(tv);
|
|
|
|
|
|