]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1408 in SNORT/snort3 from reload_reputation to master
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 31 Oct 2018 13:27:42 +0000 (09:27 -0400)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 31 Oct 2018 13:27:42 +0000 (09:27 -0400)
Squashed commit of the following:

commit d467f58db0d2eb6a8618050bcdf2e48c027c83a9
Author: Silviu Minut <sminut@cisco.com>
Date:   Fri Oct 26 14:25:20 2018 -0400

    framework: set the reload_type flags to RELOAD_TYPE_NONE at the end of reload, in anticipation of future reloads.

    reputation: delete old conf before allocating a new one in ReputationModule::begin() if conf not null

    framework: replace the newly introduced loop to reset the reload_type flags with the existing Inspector::update_policy function

src/main/snort.cc
src/network_inspectors/reputation/reputation_module.cc

index a7dd0c01e42c010558b13e87d6fdaa08a7b0fc0c..e3c201ec9b094437c891cc82c861a9a49054e2e5 100644 (file)
@@ -618,6 +618,7 @@ SnortConfig* Snort::get_reload_config(const char* fname)
         MpseManager::activate_search_engine(sc->fast_pattern_config->get_search_api(), sc);
     }
 
+    InspectorManager::update_policy(sc);
     reloading = false;
     parser_term(sc);
 
index 524d376f7be0ccd6af671807f8fc5b6882c6988a..ac398fc6f5f59b18363d47ee980ee763c3ef385e 100644 (file)
@@ -145,6 +145,8 @@ ReputationConfig* ReputationModule::get_data()
 
 bool ReputationModule::begin(const char*, int, SnortConfig*)
 {
+    if ( conf )
+        delete conf;
     conf = new ReputationConfig;
     return true;
 }
@@ -160,4 +162,3 @@ bool ReputationModule::end(const char*, int, SnortConfig*)
 
     return true;
 }
-