#define DETECT_ENGINE_DEFAULT_INSPECTION_RECURSION_LIMIT 3000
-static DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
- ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt);
-
static int DetectEngineCtxLoadConf(DetectEngineCtx *);
static DetectEngineMasterCtx g_master_de_ctx = { SCMUTEX_INITIALIZER,
*
* \retval det_ctx detection engine thread ctx or NULL in case of error
*/
-static DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
+DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt)
{
DetectEngineThreadCtx *det_ctx = SCMalloc(sizeof(DetectEngineThreadCtx));
int WARN_UNUSED DetectBufferSetActiveList(Signature *s, const int list);
int DetectBufferGetActiveList(DetectEngineCtx *de_ctx, Signature *s);
+DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
+ ThreadVars *tv, DetectEngineCtx *new_de_ctx, int mt);
+
#endif /* __DETECT_ENGINE_H__ */
if (DetectEngineReload(&surifuzz) < 0) {
return 0;
}
+ DetectEngineThreadCtx *old_det_ctx = FlowWorkerGetDetectCtxPtr(fwd);
+
+ DetectEngineCtx *de_ctx = DetectEngineGetCurrent();
+ de_ctx->ref_cnt--;
+ DetectEngineThreadCtx *new_det_ctx = DetectEngineThreadCtxInitForReload(&tv, de_ctx, 1);
+ FlowWorkerReplaceDetectCtx(fwd, new_det_ctx);
+
+ DetectEngineThreadCtxDeinit(NULL, old_det_ctx);
// loop over packets
r = FPC_next(&pkts, &header, &pkt);