stream: improve --disable-detection GAP handling

pull/2673/head
Victor Julien 8 years ago
parent 6fefe70196
commit 7bddd0e168

@ -586,7 +586,7 @@ int StreamTcpReassembleInsertSegment(ThreadVars *tv, TcpReassemblyThreadCtx *ra_
static inline int SegmentInUse(TcpSession *ssn, TcpStream *stream, TcpSegment *seg)
{
/* if proto detect isn't done, we're not returning */
if (!(stream->flags & STREAMTCP_STREAM_FLAG_GAP)) {
if (!(stream->flags & (STREAMTCP_STREAM_FLAG_GAP|STREAMTCP_STREAM_FLAG_NOREASSEMBLY))) {
if (!(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(stream))) {
SCReturnInt(1);
}
@ -756,8 +756,9 @@ void StreamTcpPruneSession(Flow *f, uint8_t flags)
StreamingBufferClear(&stream->sb);
return;
} else if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) &&
(stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW))
} else if (((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) ||
(stream->flags & STREAMTCP_STREAM_FLAG_GAP)) &&
(stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW))
{
SCLogDebug("ssn %p: both app and raw are done, "
"STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn);

Loading…
Cancel
Save