From: Sreeja Athirkandathil Narayanan (sathirka) Date: Tue, 6 Dec 2022 17:00:14 +0000 (+0000) Subject: Pull request #3677: appid: Do not reset session data when built-in discovery is not... X-Git-Tag: 3.1.49.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd2404137de808790154a3292815a9e641719ebf;p=thirdparty%2Fsnort3.git Pull request #3677: appid: Do not reset session data when built-in discovery is not done Merge in SNORT/snort3 from ~OSTEPANO/snort3:appid_ftp_detection_over_navl to master Squashed commit of the following: commit 63cc4b95e86420c3cdec20719286bd10f069fe01 Author: Oleksandr Stepanov Date: Wed Nov 30 06:28:54 2022 -0500 appid: Do not reset session data when built-in discovery is not done --- diff --git a/src/network_inspectors/appid/service_plugins/service_discovery.cc b/src/network_inspectors/appid/service_plugins/service_discovery.cc index 31d3c3477..d05c0a92b 100644 --- a/src/network_inspectors/appid/service_plugins/service_discovery.cc +++ b/src/network_inspectors/appid/service_plugins/service_discovery.cc @@ -673,7 +673,8 @@ bool ServiceDiscovery::do_service_discovery(AppIdSession& asd, Packet* p, asd.get_session_flags(APPID_SESSION_INITIATOR_MONITORED | APPID_SESSION_RESPONDER_MONITORED) ) ) ) { - asd.free_flow_data_by_mask(APPID_SESSION_DATA_SERVICE_MODSTATE_BIT); + if (asd.service_candidates.empty() and !asd.service_detector) + asd.free_flow_data_by_mask(APPID_SESSION_DATA_SERVICE_MODSTATE_BIT); asd.service_detector = entry->service_detector; } else if (prev_service_state == APPID_DISCO_STATE_NONE)