AppLayerThreadCtx *app_tctx = ra_ctx->app_tctx;
AppProto alproto;
- uint8_t dir;
int r = 0;
SCLogDebug("data_len %u flags %02X", data_len, flags);
if (flags & STREAM_TOSERVER) {
alproto = f->alproto_ts;
- dir = 0;
} else {
alproto = f->alproto_tc;
- dir = 1;
}
/* if we don't know the proto yet and we have received a stream
* only run the proto detection once. */
if (alproto == ALPROTO_UNKNOWN && (flags & STREAM_GAP)) {
StreamTcpSetStreamFlagAppProtoDetectionCompleted(stream);
- StreamTcpSetSessionNoReassemblyFlag(ssn, dir);
SCLogDebug("ALPROTO_UNKNOWN flow %p, due to GAP in stream start", f);
} else if (alproto == ALPROTO_UNKNOWN && (flags & STREAM_START)) {
/* this function can be directly called by app layer protocol
* detection. */
- if (stream->flags & STREAMTCP_STREAM_FLAG_NOREASSEMBLY) {
+ if (stream->flags & (STREAMTCP_STREAM_FLAG_NOREASSEMBLY|STREAMTCP_STREAM_FLAG_GAP)) {
SCLogDebug("stream no reassembly flag set. Mostly called via "
"app proto detection.");
SCReturnInt(0);