detect: make packet and tx_id available earlier

So transforms can access them through DetectEngineThreadCtx
pull/13255/head
Victor Julien 2 years ago committed by Jeff Lucovsky
parent aec2513799
commit c02f56877e

@ -1698,6 +1698,10 @@ static void DetectRunTx(ThreadVars *tv,
SCLogDebug("%p/%" PRIu64 " txd flags %02x", tx.tx_ptr, tx_id_min, tx.tx_data_ptr->flags);
det_ctx->tx_id = tx.tx_id;
det_ctx->tx_id_set = true;
det_ctx->p = p;
bool do_sort = false; // do we need to sort the tx candidate list?
uint32_t array_idx = 0;
uint32_t total_rules = det_ctx->match_array_cnt;
@ -1790,9 +1794,6 @@ static void DetectRunTx(ThreadVars *tv,
if (array_idx >= de_ctx->profile_match_logging_threshold)
RulesDumpTxMatchArray(det_ctx, scratch->sgh, p, tx.tx_id, array_idx, x);
#endif
det_ctx->tx_id = tx.tx_id;
det_ctx->tx_id_set = true;
det_ctx->p = p;
#ifdef DEBUG
for (uint32_t i = 0; i < array_idx; i++) {

Loading…
Cancel
Save