aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-22 00:57:35 +0200
committerLuca Deri <deri@ntop.org>2019-10-22 00:57:35 +0200
commit0ffe5cf1ff7ab2ec90b5674936aa0f2555e3d414 (patch)
treee08bce3ecddf67ec7f4a3f7abb282b7413402ee0 /src/lib/ndpi_main.c
parentd023f9bf2df8b0c548acf37bd8e9c1a842054cdf (diff)
Added extra processing for POP and SMTP
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 995bc4c26..8e3f704e4 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4651,18 +4651,10 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct
ret.master_protocol = flow->detected_protocol_stack[1], ret.app_protocol = flow->detected_protocol_stack[0];
if(flow->server_id == NULL) flow->server_id = dst; /* Default */
+
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN) {
- /*
- With SSL we might want to dissect further packets to decode
- the certificate type for instance
- */
- if(flow->check_extra_packets
- /*
- && (flow->detected_protocol_stack[0] == NDPI_PROTOCOL_TLS)
- */
- ) {
+ if(flow->check_extra_packets) {
ndpi_process_extra_packet(ndpi_str, flow, packet, packetlen, current_tick_l, src, dst);
-
return(ret);
} else
goto ret_protocols;
@@ -6467,7 +6459,7 @@ int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struc
*/
u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndpi_str,
struct ndpi_flow_struct *flow) {
- u_int16_t proto = flow->detected_protocol_stack[1] ? flow->detected_protocol_stack[1] : flow->detected_protocol_stack[0];
+ u_int16_t proto = flow->detected_protocol_stack[1] ? flow->detected_protocol_stack[1] : flow->detected_protocol_stack[0];
#if 0
printf("[DEBUG] %s(%u.%u): %u\n", __FUNCTION__,
@@ -6493,6 +6485,14 @@ u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndp
return(1);
break;
+ case NDPI_PROTOCOL_FTP_CONTROL:
+ case NDPI_PROTOCOL_MAIL_POP:
+ case NDPI_PROTOCOL_MAIL_IMAP:
+ case NDPI_PROTOCOL_MAIL_SMTP:
+ if(flow->protos.ftp_imap_pop_smtp.password[0] == '\0')
+ return(1);
+ break;
+
case NDPI_PROTOCOL_SSH:
if((flow->protos.ssh.hassh_client[0] == '\0')
|| (flow->protos.ssh.hassh_server[0] == '\0'))