Merge in SNORT/snort3 from ~YEFURMAN/snort3:ssh_service_detection_fix to master
Squashed commit of the following:
commit
21a4f27f6cda49e6b176f6ae1461d24db1a28611
Author: yefurman <yefurman@cisco.com>
Date: Fri Oct 24 09:49:36 2025 -0400
appid: fix ssh service detection with dropped packets
// Do port-based detection only for responder packets.
if (asd.get_session_flags(APPID_SESSION_PORT_SERVICE_DONE) or
!asd.get_session_flags(APPID_SESSION_PAYLOAD_SEEN) or
+ asd.get_session_flags(APPID_SESSION_WAIT_FOR_EXTERNAL) or
(direction != APP_ID_FROM_RESPONDER))
return;
assert(hsession);
}
- if (tp_app_id == APP_ID_SSH)
+ if (tp_app_id == APP_ID_SSH and !(p->flow->get_session_flags() & SSNFLAG_MIDSTREAM))
{
APPID_LOG(p, TRACE_DEBUG_LEVEL, "Setting the ignore and early detection flag\n");
asd.get_odp_ctxt().get_app_info_mgr().set_app_info_flags(tp_app_id, APPINFO_FLAG_IGNORE);