void OdpContext::dump_appid_config()
{
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: dns_host_reporting %s\n", (dns_host_reporting ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: referred_appId_disabled %s\n", (referred_appId_disabled ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: mdns_user_reporting %s\n", (mdns_user_reporting ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_userid_disabled %s\n", (chp_userid_disabled ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: is_host_port_app_cache_runtime %s\n", (is_host_port_app_cache_runtime ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: check_host_port_app_cache %s\n", (check_host_port_app_cache ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: check_host_cache_unknown_ssl %s\n", (check_host_cache_unknown_ssl ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: ftp_userid_disabled %s\n", (ftp_userid_disabled ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_body_collection_disabled %s\n", (chp_body_collection_disabled ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_body_collection_max %d\n", chp_body_collection_max);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: rtmp_max_packets %d\n", rtmp_max_packets);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_tp_flow_depth %d\n", max_tp_flow_depth);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: tp_allow_probes %s\n", (tp_allow_probes ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: host_port_app_cache_lookup_interval %d\n", host_port_app_cache_lookup_interval);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: host_port_app_cache_lookup_range %d\n", host_port_app_cache_lookup_range);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: allow_port_wildcard_host_cache %s\n", (allow_port_wildcard_host_cache ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: allow_port_wildcard_firstpkt_cache %s\n", (allow_port_wildcard_firstpkt_cache ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: recheck_for_portservice_appid %s\n", (recheck_for_portservice_appid ? "True" : "False"));
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_bytes_before_service_fail %" PRIu64" \n", max_bytes_before_service_fail);
- APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_packet_before_service_fail %" PRIu16" \n", max_packet_before_service_fail);
- 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");
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: dns_host_reporting %s\n", (dns_host_reporting ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: referred_appId_disabled %s\n", (referred_appId_disabled ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: mdns_user_reporting %s\n", (mdns_user_reporting ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_userid_disabled %s\n", (chp_userid_disabled ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: is_host_port_app_cache_runtime %s\n", (is_host_port_app_cache_runtime ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: check_host_port_app_cache %s\n", (check_host_port_app_cache ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: check_host_cache_unknown_ssl %s\n", (check_host_cache_unknown_ssl ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: ftp_userid_disabled %s\n", (ftp_userid_disabled ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_body_collection_disabled %s\n", (chp_body_collection_disabled ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: chp_body_collection_max %d\n", chp_body_collection_max);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: rtmp_max_packets %d\n", rtmp_max_packets);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_tp_flow_depth %d\n", max_tp_flow_depth);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: tp_allow_probes %s\n", (tp_allow_probes ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: host_port_app_cache_lookup_interval %d\n", host_port_app_cache_lookup_interval);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: host_port_app_cache_lookup_range %d\n", host_port_app_cache_lookup_range);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: allow_port_wildcard_host_cache %s\n", (allow_port_wildcard_host_cache ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: allow_port_wildcard_firstpkt_cache %s\n", (allow_port_wildcard_firstpkt_cache ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: recheck_for_portservice_appid %s\n", (recheck_for_portservice_appid ? "True" : "False"));
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_bytes_before_service_fail %" PRIu64" \n", max_bytes_before_service_fail);
+ APPID_LOG(nullptr, TRACE_INFO_LEVEL, "Appid Config: max_packet_before_service_fail %" PRIu16" \n", max_packet_before_service_fail);
+ 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: max_midstream_packet_before_service_fail %d\n", max_midstream_packet_before_service_fail);
+ 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");
}
bool OdpContext::is_appid_cpu_profiler_running()
}
asd.service_disco_state = APPID_DISCO_STATE_STATEFUL;
}
- else
+ else if (asd.is_midstream_svc_taking_too_much_time())
{
asd.set_session_flags(APPID_SESSION_SERVICE_DETECTED);
asd.service_disco_state = APPID_DISCO_STATE_FINISHED;
(asd.is_tp_appid_available() or asd.get_session_flags(APPID_SESSION_NO_TPI)))
asd.set_payload_id(APP_ID_UNKNOWN);
}
+ else
+ {
+ asd.service_disco_state = APPID_DISCO_STATE_STATEFUL;
+ ++asd.srv_midstream_packet_inspected;
+ }
}
else
{
asd.service_disco_state = APPID_DISCO_STATE_STATEFUL;
}
}
+ else if ((p->flow->get_session_flags() & SSNFLAG_MIDSTREAM) and
+ asd.service_disco_state != APPID_DISCO_STATE_FINISHED and
+ !(asd.protocol == IpProtocol::TCP and (p->ptrs.sp == 21 or p->ptrs.dp == 21) and
+ !(p->ptrs.tcph->is_fin() or p->ptrs.tcph->is_rst())))
+ {
+ if (asd.is_midstream_svc_taking_too_much_time())
+ {
+ asd.set_session_flags(APPID_SESSION_SERVICE_DETECTED);
+ asd.service_disco_state = APPID_DISCO_STATE_FINISHED;
+
+ if ((asd.get_payload_id() == APP_ID_NONE) and
+ (asd.is_tp_appid_available() or asd.get_session_flags(APPID_SESSION_NO_TPI)))
+ {
+ asd.set_payload_id(APP_ID_UNKNOWN);
+ }
+ }
+ else
+ {
+ ++asd.srv_midstream_packet_inspected;
+ }
+ }
+
if (asd.is_encrypted_oportunistic_tls_session() and asd.encrypted.service_id > 0)
{
bool service_found = identify_service(asd, p, direction, change_bits) == APPID_SUCCESS;
is_discovery_done = true;
+ if ((p->flow->get_session_flags() & SSNFLAG_MIDSTREAM) and service_found)
+ asd.srv_midstream_packet_inspected = 0;
+
// Check to see if we want to stop any detectors for SIP/RTP.
if (tp_app_id == APP_ID_SIP)
{