Improvements to stop dissection when the first protocol is detected

Used IP-based detection to compute the application protocol
Improved application detection
This commit is contained in:
Luca Deri
2019-11-28 23:20:40 +01:00
parent d328c3bccc
commit 7da7ae622b
12 changed files with 105 additions and 104 deletions
+1 -1
View File
@@ -58,8 +58,8 @@ void ndpi_search_ntp_udp(struct ndpi_detection_module_struct *ndpi_struct, struc
return;
}
}
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
}
+5 -8
View File
@@ -1400,19 +1400,16 @@ void ndpi_search_tls_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct,
u_int8_t ret, skip_cert_processing = 0;
#ifdef DEBUG_TLS
printf("%s()\n", __FUNCTION__);
printf("==>> %u [len: %u][version: %u]\n",
flow->guessed_host_protocol_id,
packet->payload_packet_len,
flow->protos.stun_ssl.ssl.ssl_version);
#endif
if(packet->udp != NULL) {
/* DTLS dissector */
int rc = sslTryAndRetrieveServerCertificate(ndpi_struct, flow);
#ifdef DEBUG_TLS
printf("==>> %u [rc: %d][len: %u][%s][version: %u]\n",
flow->guessed_host_protocol_id, rc, packet->payload_packet_len, flow->protos.stun_ssl.ssl.ja3_server,
flow->protos.stun_ssl.ssl.ssl_version);
#endif
if((rc == 0) && (flow->protos.stun_ssl.ssl.ssl_version != 0)) {
flow->guessed_protocol_id = NDPI_PROTOCOL_TLS;