]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
enable active for react / reject only if used in configuration
authorRuss Combs <rucombs@cisco.com>
Sat, 21 Mar 2015 12:41:30 +0000 (08:41 -0400)
committerRuss Combs <rucombs@cisco.com>
Sat, 21 Mar 2015 12:41:30 +0000 (08:41 -0400)
ChangeLog
src/actions/act_react.cc
src/actions/act_reject.cc

index 30b8a807843982d44d7ad4d757a29541ee1a268d..6165727c4a89cf49f293251f8e6057c81db622ec 100644 (file)
--- 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
index 5458c017bc5b8b55c456c8c508166a61839ac7b5..bcd87019ee91f7b4a5da0bd8d507f137ee03be6b 100644 (file)
@@ -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
index 7158d0aada85b1dc497d2bf01b0b4ace0c01c7b6..a8e26a5d7f32301cf96398ab45694ba8e075e4ae 100644 (file)
@@ -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,