From 0818a151ecbbbaa142411c60c30d153ca9734098 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 11 Jan 2012 11:23:36 +0100 Subject: [PATCH] Add reject support to live single, autofp and workers runmodes. --- src/util-runmodes.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/util-runmodes.c b/src/util-runmodes.c index 557f8aabc0..2fa55e529f 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -585,6 +585,13 @@ int RunModeSetLiveCaptureAutoFp(DetectEngineCtx *de_ctx, } tv_detect_ncpu->thread_group_name = thread_group_name; + tm_module = TmModuleGetByName("RespondReject"); + if (tm_module == NULL) { + SCLogError(SC_ERR_RUNMODE, "TmModuleGetByName RespondReject failed"); + exit(EXIT_FAILURE); + } + TmSlotSetFuncAppend(tv_detect_ncpu, tm_module, NULL); + /* add outputs as well */ SetupOutputs(tv_detect_ncpu); @@ -669,6 +676,13 @@ static int RunModeSetLiveCaptureWorkersForDevice(DetectEngineCtx *de_ctx, } TmSlotSetFuncAppend(tv, tm_module, (void *)de_ctx); + tm_module = TmModuleGetByName("RespondReject"); + if (tm_module == NULL) { + SCLogError(SC_ERR_RUNMODE, "TmModuleGetByName RespondReject failed"); + exit(EXIT_FAILURE); + } + TmSlotSetFuncAppend(tv, tm_module, NULL); + SetupOutputs(tv); if (TmThreadSpawn(tv) != TM_ECODE_OK) {