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.
This commit is contained in:
+1
-1
@@ -1086,7 +1086,7 @@ struct ndpi_flow_struct {
|
||||
} http;
|
||||
|
||||
struct {
|
||||
uint8_t auth_found:1, auth_failed:1, _pad:5;
|
||||
uint8_t auth_found:1, auth_failed:1, auth_tls:1, _pad:5;
|
||||
char username[16], password[16];
|
||||
} ftp_imap_pop_smtp;
|
||||
|
||||
|
||||
@@ -507,6 +507,15 @@ class Http2(Structure):
|
||||
("nat_ip", c_char * 24)
|
||||
]
|
||||
|
||||
class FtpImapPopSmtp(Structure):
|
||||
_fields_ = [
|
||||
("auth_found", c_uint8, 1),
|
||||
("auth_failed", c_uint8, 1),
|
||||
("auth_tls", c_uint8, 1),
|
||||
("_pad", c_uint8, 5),
|
||||
("username", c_char * 16),
|
||||
("password", c_char * 16)
|
||||
]
|
||||
|
||||
class Bittorrent(Structure):
|
||||
_fields_ = [("hash", c_char * 20)]
|
||||
@@ -529,6 +538,7 @@ class Protos(Union):
|
||||
("mdns", Mdns),
|
||||
("ubntac2", Ubntac2),
|
||||
("http", Http2),
|
||||
("ftp_imap_pop_smtp", FtpImapPopSmtp),
|
||||
("bittorrent", Bittorrent),
|
||||
("dhcp", Dhcp)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user