stream: wait for protocol detection to complete

Wait for protocol detection to complete before removing segments
from the list.
pull/672/merge
Victor Julien 12 years ago
parent 0460b194b1
commit daedb6c557

@ -3052,6 +3052,10 @@ static int StreamTcpReassembleRaw (TcpReassemblyThreadCtx *ra_ctx,
seg, seg->seq, seg->payload_len, seg, seg->seq, seg->payload_len,
(uint32_t)(seg->seq + seg->payload_len)); (uint32_t)(seg->seq + seg->payload_len));
if ((p->flow->flags & FLOW_NO_APPLAYER_INSPECTION) ||
(stream->flags & STREAMTCP_STREAM_FLAG_APPPROTO_DETECTION_COMPLETED) ||
(stream->flags & STREAMTCP_STREAM_FLAG_GAP))
{
/* Remove the segments which are either completely before the /* Remove the segments which are either completely before the
ra_base_seq or if they are beyond ra_base_seq, but the segment offset ra_base_seq or if they are beyond ra_base_seq, but the segment offset
from which we need to copy in to smsg is beyond the stream->last_ack. from which we need to copy in to smsg is beyond the stream->last_ack.
@ -3073,6 +3077,7 @@ static int StreamTcpReassembleRaw (TcpReassemblyThreadCtx *ra_ctx,
seg = next_seg; seg = next_seg;
continue; continue;
} }
}
/* if app layer protocol has been detected, then remove all the segments /* if app layer protocol has been detected, then remove all the segments
* which has been previously processed and reassembled * which has been previously processed and reassembled

Loading…
Cancel
Save