With data on SYN the sequence number used for the first data
was off by one, leading to the next segments to appear to come
after a one byte gap.
TCP_SEG_LEN(seg) = size;
seg->seq = TCP_GET_SEQ(p);
+ /* HACK: for TFO SYN packets the seq for data starts at + 1 */
+ if (TCP_HAS_TFO(p) && p->payload_len && p->tcph->th_flags == TH_SYN)
+ seg->seq += 1;
+
/* proto detection skipped, but now we do get data. Set event. */
if (RB_EMPTY(&stream->seg_tree) &&
stream->flags & STREAMTCP_STREAM_FLAG_APPPROTO_DETECTION_SKIPPED) {