aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2022-07-05 17:38:32 +0200
committerLuca Deri <deri@ntop.org>2022-07-05 17:38:32 +0200
commitc019946f601bf3b55f64f78841a0d696e6c0bfc5 (patch)
tree9b35e9832789617cd5dccae095877d4996ba0223
parent76459094605efd46bd71ce28ce9616280f4a440d (diff)
Compilation fix
-rw-r--r--src/include/ndpi_define.h.in16
-rw-r--r--src/lib/ndpi_main.c7
2 files changed, 23 insertions, 0 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in
index 2999a38f7..c0566ca8e 100644
--- a/src/include/ndpi_define.h.in
+++ b/src/include/ndpi_define.h.in
@@ -453,4 +453,20 @@ static inline u_int64_t get_u_int64_t(const u_int8_t* X, int O)
#define ETH_P_PPPoE 0x8864
#endif
+#define SMTP_BIT_220 0x01
+#define SMTP_BIT_250 0x02
+#define SMTP_BIT_235 0x04
+#define SMTP_BIT_334 0x08
+#define SMTP_BIT_354 0x10
+#define SMTP_BIT_HELO_EHLO 0x20
+#define SMTP_BIT_MAIL 0x40
+#define SMTP_BIT_RCPT 0x80
+#define SMTP_BIT_AUTH_LOGIN 0x100
+#define SMTP_BIT_STARTTLS 0x200
+#define SMTP_BIT_DATA 0x400
+#define SMTP_BIT_NOOP 0x800
+#define SMTP_BIT_RSET 0x1000
+#define SMTP_BIT_TlRM 0x2000
+#define SMTP_BIT_AUTH_PLAIN 0x4000
+
#endif /* __NDPI_DEFINE_INCLUDE_FILE__ */
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index cde3e0b2a..d071d6d9f 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -5339,6 +5339,13 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
// printf("====>> %u.%u [%u]\n", ret->master_protocol, ret->app_protocol, flow->detected_protocol_stack[0]);
switch(ret->app_protocol) {
+ case NDPI_PROTOCOL_MAIL_IMAPS:
+ case NDPI_PROTOCOL_MAIL_SMTPS:
+ case NDPI_PROTOCOL_MAIL_POPS:
+ /* ALPN not necessary for secure email */
+ NDPI_CLR_BIT(flow->risk, NDPI_TLS_NOT_CARRYING_HTTPS);
+ break;
+
/*
Skype for a host doing MS Teams means MS Teams
(MS Teams uses Skype as transport protocol for voice/video)