From: Russ Combs Date: Sat, 21 Mar 2015 12:41:30 +0000 (-0400) Subject: enable active for react / reject only if used in configuration X-Git-Tag: 3.0.0-233~1016 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2d09e9729a8cb83a747770982eb5ad93f36cd3a;p=thirdparty%2Fsnort3.git enable active for react / reject only if used in configuration --- diff --git a/ChangeLog b/ChangeLog index 30b8a8078..6165727c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Pending - build 143 +-- enable active for react / reject only if used in configuration -- fixed use of bound ip and tcp policy if not set in hosts -- eliminate dedicated nhttp chunk buffer -- minor nhttp cleanup in StreamSplitter diff --git a/src/actions/act_react.cc b/src/actions/act_react.cc index 5458c017b..bcd87019e 100644 --- a/src/actions/act_react.cc +++ b/src/actions/act_react.cc @@ -321,6 +321,7 @@ static IpsAction* react_ctor(Module* p) rd->rule_msg = m->msg; react_config(rd); // FIXIT-L this must be done per response + Active_SetEnabled(1); return new ReactAction(rd); } @@ -330,11 +331,6 @@ static void react_dtor(IpsAction* p) delete p; } -static void react_pinit() -{ - Active_SetEnabled(1); -} - static const ActionApi react_api = { { @@ -350,7 +346,7 @@ static const ActionApi react_api = mod_dtor }, RULE_TYPE__DROP, - react_pinit, + nullptr, // pinit nullptr, // pterm nullptr, // tinit nullptr, // tterm diff --git a/src/actions/act_reject.cc b/src/actions/act_reject.cc index 7158d0aad..a8e26a5d7 100644 --- a/src/actions/act_reject.cc +++ b/src/actions/act_reject.cc @@ -213,6 +213,7 @@ static void mod_dtor(Module* m) static IpsAction* rej_ctor(Module* p) { RejectModule* m = (RejectModule*)p; + Active_SetEnabled(1); return new RejectAction(m->flags); } @@ -221,11 +222,6 @@ static void rej_dtor(IpsAction* p) delete p; } -static void rej_ginit() -{ - Active_SetEnabled(1); -} - static const ActionApi rej_api = { { @@ -241,7 +237,7 @@ static const ActionApi rej_api = mod_dtor }, RULE_TYPE__DROP, - rej_ginit, + nullptr, nullptr, nullptr, nullptr,