]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4924: appid: retain shadow traffic status after reload detectors
authorAndres Avila Segura (aavilase) <aavilase@cisco.com>
Tue, 30 Sep 2025 22:32:44 +0000 (22:32 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Tue, 30 Sep 2025 22:32:44 +0000 (22:32 +0000)
Merge in SNORT/snort3 from ~AAVILASE/snort3:retain_st_state_after_reload to master

Squashed commit of the following:

commit 084ec7699094f59a8d32653e8f9d2fff286b3d0c
Author: Andres Avila <aavilase@cisco.com>
Date:   Mon Sep 29 20:49:02 2025 -0400

    appid: retain the shadow traffic status after detector reload

src/network_inspectors/appid/appid_config.cc
src/network_inspectors/appid/appid_module.cc

index 6404abb73a358992dda534a58063755a092b557d..59b92a5176560832b2fa751302a030c356e6c3b8 100644 (file)
@@ -229,6 +229,7 @@ void OdpContext::dump_appid_config()
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_packet_service_fail_ignore_bytes %" PRIu16" \n", max_packet_service_fail_ignore_bytes);
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: eve_http_client                      %s\n", (eve_http_client ? "True" : "False"));
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: appid_cpu_profiler                   %s\n", (appid_cpu_profiler ? "True" : "False"));
+    APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: shadow_traffic_status                %s\n", (get_appid_shadow_traffic_status() ? "True" : "False"));
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: brute_force_inprocess_threshold      %" PRId8" \n", brute_force_inprocess_threshold);
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: failed_state_expiration_secs         %" PRId32" \n", failed_state_expiration_secs);
     APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: inspect_ooo_flows                    %s\n", inspect_ooo_flows ? "True" : "False");
index 23179288d4be6eddbe82516a05638fe1ec21cdb0..ef33ce091c68fdedbdf125d52a2203a7e9cfd4c1 100644 (file)
@@ -270,6 +270,7 @@ bool ACOdpContextSwap::execute(Analyzer&, void**)
     ServiceDiscovery::set_thread_local_ftp_service();
     AppIdContext& ctxt = inspector.get_ctxt();
     OdpContext& current_odp_ctxt = ctxt.get_odp_ctxt();
+    current_odp_ctxt.set_appid_shadow_traffic_status(odp_ctxt.get_appid_shadow_traffic_status());
     AppIdServiceState::set_service_thresholds(current_odp_ctxt.failed_state_expiration_secs, current_odp_ctxt.brute_force_inprocess_threshold);
     assert(pkt_thread_odp_ctxt != &current_odp_ctxt);
     pkt_thread_odp_ctxt = &current_odp_ctxt;