]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3987: detection: fix of default ips policy switching
authorAnna Norokh -X (anorokh - SOFTSERVE INC at Cisco) <anorokh@cisco.com>
Mon, 11 Sep 2023 14:54:56 +0000 (14:54 +0000)
committerOleksii Shumeiko -X (oshumeik - SOFTSERVE INC at Cisco) <oshumeik@cisco.com>
Mon, 11 Sep 2023 14:54:56 +0000 (14:54 +0000)
Merge in SNORT/snort3 from ~ANOROKH/snort3:file_id_tenant_fix to master

Squashed commit of the following:

commit 4a0f89aab337ca876c5a46014f5be2c36217c42e
Author: Anna Norokh <anorokh@cisco.com>
Date:   Fri Sep 1 18:15:37 2023 +0300

    detection: fix of default ips policy switching

    Because in case of tenant or adress_space configurations, previous code will switch
    policy to network related IPS policy, not to default.

src/detection/fp_detect.cc

index 1ce83bf6e1974d4a1803930ee110c89ea5015e34..5069726a25d519c81711e3f4614f901085318b08 100644 (file)
@@ -1399,7 +1399,7 @@ void fp_eval_service_group(Packet* p, SnortProtocolId snort_protocol_id)
     IpsContext::ActiveRules actv_rules = c->active_rules;
     c->active_rules = IpsContext::CONTENT;
     IpsPolicy* ips_policy = snort::get_ips_policy();
-    snort::set_ips_policy(get_default_ips_policy(SnortConfig::get_conf()));
+    snort::set_ips_policy(get_ips_policy(SnortConfig::get_conf()));
 
     print_pkt_info(p, "file_id fast-patterns"); //FIXIT
     fpEvalHeaderSW(svc, p, 0, FPTask::FP, true, true);