diff --git a/src/detect-engine.c b/src/detect-engine.c index 61c7409228..4e167f0613 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -1350,6 +1350,12 @@ static TmEcode ThreadCtxDoInit (DetectEngineCtx *de_ctx, DetectEngineThreadCtx * */ TmEcode DetectEngineThreadCtxInit(ThreadVars *tv, void *initdata, void **data) { + if (DetectEngineMultiTenantEnabled()) { + DetectEngineThreadCtx *mt_det_ctx = DetectEngineThreadCtxInitForMT(tv); + *data = (void *)mt_det_ctx; + return (mt_det_ctx == NULL) ? TM_ECODE_FAILED : TM_ECODE_OK; + } + /* first register the counter. In delayed detect mode we exit right after if the * rules haven't been loaded yet. */ uint16_t counter_alerts = StatsRegisterCounter("detect.alert", tv);