uint8_t direction = (flags & STREAM_TOSERVER) ? 0 : 1;
int check_before_add = 0;
+ /* see if we want to pass on the FLUSH flag */
+ if ((s->flags & SIG_FLAG_FLUSH) == 0)
+ flags &=~ STREAM_FLUSH;
+
/* if continue detection already inspected this rule for this tx,
* continue with the first not-inspected tx */
uint8_t offset = det_ctx->de_state_sig_array[s->num] & 0x7f;
Signature *s = de_ctx->sig_array[item->sid];
det_ctx->stream_already_inspected = false;
+ /* see if we want to pass on the FLUSH flag */
+ if ((s->flags & SIG_FLAG_FLUSH) == 0)
+ flags &=~ STREAM_FLUSH;
+
SCLogDebug("file_no_match %u, sid %u", *file_no_match, s->id);
/* check if a sig in state 'full inspect' needs to be reconsidered
AppendStreamInspectEngine(s, stream, 0, last_id + 1);
AppendStreamInspectEngine(s, stream, 1, last_id + 1);
}
+
+ if (s->init_data->init_flags & SIG_FLAG_INIT_NEED_FLUSH) {
+ s->flags |= SIG_FLAG_FLUSH;
+ }
}
#ifdef DEBUG
s->mask |= SIG_MASK_REQUIRE_SMTP_STATE;
}
+
+ /* server body needs to be inspected in sync with stream if possible */
+ s->init_data->init_flags |= SIG_FLAG_INIT_NEED_FLUSH;
+
SCLogDebug("callback invoked by %u", s->id);
}
SCLogDebug("callback invoked by %u", s->id);
AppLayerHtpEnableRequestBodyCallback();
s->mask |= SIG_MASK_REQUIRE_HTTP_STATE;
+
+ /* client body needs to be inspected in sync with stream if possible */
+ s->init_data->init_flags |= SIG_FLAG_INIT_NEED_FLUSH;
}
/**
#define SIG_FLAG_MPM_NEG (1<<11)
+#define SIG_FLAG_FLUSH (1<<12) /**< detection logic needs stream flush notification */
+
#define SIG_FLAG_REQUIRE_FLOWVAR (1<<17) /**< signature can only match if a flowbit, flowvar or flowint is available. */
#define SIG_FLAG_FILESTORE (1<<18) /**< signature has filestore keyword */
#define SIG_FLAG_INIT_FLOW (1<<2) /**< signature has a flow setting */
#define SIG_FLAG_INIT_BIDIREC (1<<3) /**< signature has bidirectional operator */
#define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN (1 << 4) /** < signature has seen the first ip_proto keyword */
+#define SIG_FLAG_INIT_NEED_FLUSH (1<<7)
/* signature mask flags */
#define SIG_MASK_REQUIRE_PAYLOAD (1<<0)