From c5fffce96cb538023d495161960812cf27558757 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 9 Sep 2019 21:17:53 +0200 Subject: Added IMO dissector Fixed TLS/UDP detection Reduced UBNT buffer for saving space --- src/lib/protocols/tls.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib/protocols/tls.c') diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 185706457..ce78d9322 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -1050,10 +1050,7 @@ void ndpi_search_tls_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, if(packet->udp != NULL) { /* DTLS dissector */ -#ifdef DEBUG_TLS - int rc = /* sslTryAndRetrieveServerCertificate(...) */ -#endif - sslTryAndRetrieveServerCertificate(ndpi_struct, flow); + int rc = sslTryAndRetrieveServerCertificate(ndpi_struct, flow); #ifdef DEBUG_TLS printf("==>> %u [rc: %u][len: %u][%s][version: %u]\n", @@ -1061,7 +1058,7 @@ void ndpi_search_tls_tcp_udp(struct ndpi_detection_module_struct *ndpi_struct, flow->protos.stun_ssl.ssl.ssl_version); #endif - if(flow->protos.stun_ssl.ssl.ssl_version != 0) { + if((rc == 0) && (flow->protos.stun_ssl.ssl.ssl_version != 0)) { flow->guessed_protocol_id = NDPI_PROTOCOL_TLS; if(flow->protos.stun_ssl.stun.num_udp_pkts > 0) { -- cgit v1.2.3