Work around many tests not setting up stream completely or correctly.
static inline bool STREAM_LASTACK_GT_BASESEQ(const TcpStream *stream)
{
/* last ack not yet initialized */
- if (STREAM_BASE_OFFSET(stream) == 0 && (stream->tcp_flags & TH_ACK) == 0)
+ if (STREAM_BASE_OFFSET(stream) == 0 && (stream->tcp_flags & TH_ACK) == 0) {
+#ifdef UNITTESTS
+ if (RunmodeIsUnittests() && stream->last_ack == 0)
+ return false;
+#else
return false;
+#endif
+ }
if (SEQ_GT(stream->last_ack, stream->base_seq))
return true;
return false;