@ -2620,6 +2620,12 @@ static inline int DoReassemble(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
TcpSession * ssn , TcpStream * stream , TcpSegment * seg , ReassembleData * rd ,
TcpSession * ssn , TcpStream * stream , TcpSegment * seg , ReassembleData * rd ,
Packet * p )
Packet * p )
{
{
/* fast paths: send data directly into the app layer, w/o first doing
* a copy step . However , don ' t use the fast path until protocol detection
* has been completed
* TODO if initial data is big enough for proto detect , we could do the
* fast path anyway . */
if ( stream - > flags & STREAMTCP_STREAM_FLAG_APPPROTO_DETECTION_COMPLETED ) {
/* fast path 1: segment is exactly what we need */
/* fast path 1: segment is exactly what we need */
if ( likely ( rd - > data_len = = 0 & &
if ( likely ( rd - > data_len = = 0 & &
SEQ_EQ ( seg - > seq , rd - > ra_base_seq + 1 ) & &
SEQ_EQ ( seg - > seq , rd - > ra_base_seq + 1 ) & &
@ -2666,6 +2672,7 @@ static inline int DoReassemble(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
}
}
return 1 ;
return 1 ;
}
}
}
# ifdef DEBUG
# ifdef DEBUG
ra_ctx - > sp + + ;
ra_ctx - > sp + + ;
# endif
# endif