]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3677: appid: Do not reset session data when built-in discovery is not...
authorSreeja Athirkandathil Narayanan (sathirka) <sathirka@cisco.com>
Tue, 6 Dec 2022 17:00:14 +0000 (17:00 +0000)
committerSreeja Athirkandathil Narayanan (sathirka) <sathirka@cisco.com>
Tue, 6 Dec 2022 17:00:14 +0000 (17:00 +0000)
Merge in SNORT/snort3 from ~OSTEPANO/snort3:appid_ftp_detection_over_navl to master

Squashed commit of the following:

commit 63cc4b95e86420c3cdec20719286bd10f069fe01
Author: Oleksandr Stepanov <ostepano@cisco.com>
Date:   Wed Nov 30 06:28:54 2022 -0500

    appid: Do not reset session data when built-in discovery is not done

src/network_inspectors/appid/service_plugins/service_discovery.cc

index 31d3c34775eeb001e2e422679ca285e92e26132f..d05c0a92b7b398c1ba5e58672cf894879b95bd9e 100644 (file)
@@ -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)