From: Steve Chew (stechew) Date: Tue, 6 Oct 2020 15:54:05 +0000 (+0000) Subject: Merge pull request #2528 in SNORT/snort3 from ~DERAMADA/snort3:fix_inspection_clone... X-Git-Tag: 3.0.3-2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a848d474b8511827333824e2c5e37ae5e0cfe937;p=thirdparty%2Fsnort3.git Merge pull request #2528 in SNORT/snort3 from ~DERAMADA/snort3:fix_inspection_clone to master Squashed commit of the following: commit 8c1be3ae06b4c6e3e60e738433aebb36edfec81c Author: deramada Date: Fri Oct 2 12:52:51 2020 -0400 policy: copy uuid, user_policy_id, and policy_mode when an inspection policy is cloned --- diff --git a/src/main/policy.cc b/src/main/policy.cc index ef637275d..5c12f4438 100644 --- a/src/main/policy.cc +++ b/src/main/policy.cc @@ -82,8 +82,14 @@ void InspectionPolicy::init(InspectionPolicy* other_inspection_policy) framework_policy = nullptr; cloned = false; if (other_inspection_policy) + { policy_id = other_inspection_policy->policy_id; - + policy_mode = other_inspection_policy->policy_mode; + user_policy_id = other_inspection_policy->user_policy_id; +#ifdef HAVE_UUID + uuid_copy(uuid, other_inspection_policy->uuid); +#endif + } InspectorManager::new_policy(this, other_inspection_policy); }