From: Mike Stepanek (mstepane) Date: Wed, 31 Oct 2018 13:27:42 +0000 (-0400) Subject: Merge pull request #1408 in SNORT/snort3 from reload_reputation to master X-Git-Tag: 3.0.0-249~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba981a16a956445cd705a8225ad2846da166d138;p=thirdparty%2Fsnort3.git Merge pull request #1408 in SNORT/snort3 from reload_reputation to master Squashed commit of the following: commit d467f58db0d2eb6a8618050bcdf2e48c027c83a9 Author: Silviu Minut 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 --- diff --git a/src/main/snort.cc b/src/main/snort.cc index a7dd0c01e..e3c201ec9 100644 --- a/src/main/snort.cc +++ b/src/main/snort.cc @@ -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); diff --git a/src/network_inspectors/reputation/reputation_module.cc b/src/network_inspectors/reputation/reputation_module.cc index 524d376f7..ac398fc6f 100644 --- a/src/network_inspectors/reputation/reputation_module.cc +++ b/src/network_inspectors/reputation/reputation_module.cc @@ -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; } -