aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2021-09-21 17:56:31 +0200
committerNardi Ivan <nardi.ivan@gmail.com>2021-09-21 20:53:04 +0200
commit017c1a42394501914f850fd54411884545105879 (patch)
treeff6f3b34143dd7031950d53734a06032b4091a04 /src/lib/ndpi_main.c
parentbb52f1362ca80f58eb2bb4a76bb4840fa30afab3 (diff)
FTP: fix support for START-TLS sessions
When TLS-over-FTP is used, the credentials are encrypted. So we must not wait for the username and the password commands, otherwise we elaborate a lot of packets for nothing.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 4776095ef..cc1db9ccb 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -7242,7 +7242,8 @@ u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndp
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')
+ if(flow->protos.ftp_imap_pop_smtp.password[0] == '\0' &&
+ flow->protos.ftp_imap_pop_smtp.auth_tls == 0)
return(1);
break;