This flag was checked in many places, but never set expect in 2 unittests.
STREAM_RIGHT_EDGE(&ssn->server) : 0;
SCLogDebug("size_ts %"PRIu64", size_tc %"PRIu64, size_ts, size_tc);
-#ifdef DEBUG_VALIDATION
- if (!(ssn->client.flags & STREAMTCP_STREAM_FLAG_GAP))
- BUG_ON(size_ts > 1000000UL);
- if (!(ssn->server.flags & STREAMTCP_STREAM_FLAG_GAP))
- BUG_ON(size_tc > 1000000UL);
-#endif /* DEBUG_VALIDATION */
+ DEBUG_VALIDATE_BUG_ON(size_ts > 1000000UL);
+ DEBUG_VALIDATE_BUG_ON(size_tc > 1000000UL);
if (ProtoDetectDone(f, ssn, STREAM_TOSERVER) &&
ProtoDetectDone(f, ssn, STREAM_TOCLIENT))
if (stream->flags & STREAMTCP_STREAM_FLAG_DEPTH_REACHED) {
newflags |= STREAM_DEPTH;
}
- if (stream->flags & STREAMTCP_STREAM_FLAG_GAP) {
- newflags |= STREAM_GAP;
- }
/* todo: handle pass case (also for UDP!) */
return newflags;
const char *tcp_state = StreamTcpStateAsString(ssn->state);
if (tcp_state != NULL)
jb_set_string(jb, "state", tcp_state);
- if (ssn->client.flags & STREAMTCP_STREAM_FLAG_GAP)
- JB_SET_TRUE(jb, "gap_ts");
- if (ssn->server.flags & STREAMTCP_STREAM_FLAG_GAP)
- JB_SET_TRUE(jb, "gap_tc");
}
/* Close tcp. */
static inline bool SegmentInUse(const TcpStream *stream, const TcpSegment *seg)
{
/* if proto detect isn't done, we're not returning */
- if (!(stream->flags & (STREAMTCP_STREAM_FLAG_GAP|STREAMTCP_STREAM_FLAG_NOREASSEMBLY))) {
+ if (!(stream->flags & STREAMTCP_STREAM_FLAG_NOREASSEMBLY)) {
if (!(StreamTcpIsSetStreamFlagAppProtoDetectionCompleted(stream))) {
SCReturnInt(true);
}
bool use_log = true;
uint64_t left_edge = 0;
- if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) ||
- (stream->flags & STREAMTCP_STREAM_FLAG_GAP))
- {
+ if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED)) {
use_app = false; // app is dead
}
StreamingBufferClear(&stream->sb);
return;
- } else if (((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) ||
- (stream->flags & STREAMTCP_STREAM_FLAG_GAP)) &&
- (stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW))
- {
+ } else if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) &&
+ (stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW)) {
SCLogDebug("ssn %p / stream %p: both app and raw are done, "
"STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn, stream);
stream->flags |= STREAMTCP_STREAM_FLAG_NOREASSEMBLY;
* Per STREAM flags
*/
-/** stream is in a gap state */
-#define STREAMTCP_STREAM_FLAG_GAP BIT_U16(0)
+// bit 0 vacant
/** Flag to avoid stream reassembly/app layer inspection for the stream */
#define STREAMTCP_STREAM_FLAG_NOREASSEMBLY BIT_U16(1)
/** we received a keep alive */
int use_app = 1;
int use_raw = 1;
- if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) ||
- (stream->flags & STREAMTCP_STREAM_FLAG_GAP))
- {
+ if (ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) {
// app is dead
use_app = 0;
}
stream->flags &= ~STREAMTCP_STREAM_FLAG_TRIGGER_RAW;
/* if app is active and beyond raw, sync raw to app */
- } else if (progress == 0 &&
- STREAM_APP_PROGRESS(stream) > STREAM_RAW_PROGRESS(stream) &&
- !(ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) &&
- !(stream->flags & STREAMTCP_STREAM_FLAG_GAP))
- {
+ } else if (progress == 0 && STREAM_APP_PROGRESS(stream) > STREAM_RAW_PROGRESS(stream) &&
+ !(ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED)) {
/* if trigger raw is set we sync the 2 trackers */
if (stream->flags & STREAMTCP_STREAM_FLAG_TRIGGER_RAW)
{
FLOW_INITIALIZE(&f);
stream_config.reassembly_toserver_chunk_size = 15;
- ssn.client.flags |= STREAMTCP_STREAM_FLAG_GAP;
f.protoctx = &ssn;
uint8_t payload[] = { 'C', 'C', 'C', 'C', 'C' };
FLOW_INITIALIZE(&f);
stream_config.reassembly_toserver_chunk_size = 20;
- ssn.client.flags |= STREAMTCP_STREAM_FLAG_GAP;
uint8_t payload[] = { 'C', 'C', 'C', 'C', 'C' };
Packet *p = UTHBuildPacketReal(payload, 5, IPPROTO_TCP, "1.1.1.1", "2.2.2.2", 1024, 80);
goto skip;
}
- if (p->flow->flags & FLOW_WRONG_THREAD ||
- ssn->client.flags & STREAMTCP_STREAM_FLAG_GAP ||
- ssn->server.flags & STREAMTCP_STREAM_FLAG_GAP)
- {
+ if (p->flow->flags & FLOW_WRONG_THREAD) {
/* Stream and/or session in known bad condition. Block events
* from being set. */
p->flags |= PKT_STREAM_NO_EVENTS;