From: Russ Combs (rucombs) Date: Sun, 17 Oct 2021 22:09:17 +0000 (+0000) Subject: Merge pull request #3113 in SNORT/snort3 from ~SBAIGAL/snort3:policy_clone_fix to... X-Git-Tag: 3.1.15.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a01669e3113490aa98e351879b41745eb210742;p=thirdparty%2Fsnort3.git Merge pull request #3113 in SNORT/snort3 from ~SBAIGAL/snort3:policy_clone_fix to master Squashed commit of the following: commit 4ef0ca4751a18219dcca764e81dcd3038d8b573a Author: Steven Baigal (sbaigal) Date: Sat Oct 16 10:08:05 2021 -0400 policy: update policy clone code to avoid corrupting active configuration --- diff --git a/src/main/policy.cc b/src/main/policy.cc index 1c0a30864..900626195 100644 --- a/src/main/policy.cc +++ b/src/main/policy.cc @@ -216,7 +216,8 @@ void PolicyMap::clone(PolicyMap *other_map) for ( auto p : other_map->shell_map ) { if ( p.second->inspection == other_map->inspection_policy[0] ) - shell_map[p.first]->inspection = inspection_policy[0]; + shell_map[p.first] = std::make_shared(inspection_policy[0], p.second->ips, + p.second->network); } user_inspection = other_map->user_inspection;