diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 9b03d8b17d..7b450db0b7 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -1025,7 +1025,11 @@ static int ReassembleUpdateAppLayer (ThreadVars *tv, continue; } else if (mydata == NULL || mydata_len == 0) { /* Possibly a gap, but no new data. */ - return 0; + if ((p->flags & PKT_PSEUDO_STREAM_END) == 0 || ssn->state < TCP_CLOSED) + SCReturnInt(0); + + mydata = NULL; + mydata_len = 0; } SCLogDebug("%"PRIu64" got %p/%u", p->pcap_cnt, mydata, mydata_len); break;