aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2015-07-13 15:34:47 +0200
committerLuca <deri@ntop.org>2015-07-13 15:34:47 +0200
commit0b7af2dbbc5b6ee6480ab3022a1e1e4695a916bd (patch)
tree82d17755411a6835b6ad6b4f1b13de369c5f065f /src
parent9d1e99ad0a45f7fefc1d4a9a46c061c3aa5f60b7 (diff)
Fixes for #27
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_protocol_ids.h5
-rw-r--r--src/lib/ndpi_content_match.c.inc5
-rw-r--r--src/lib/ndpi_main.c5
-rw-r--r--src/lib/protocols/http.c12
4 files changed, 7 insertions, 20 deletions
diff --git a/src/include/ndpi_protocol_ids.h b/src/include/ndpi_protocol_ids.h
index 06b3d6e52..6bac39160 100644
--- a/src/include/ndpi_protocol_ids.h
+++ b/src/include/ndpi_protocol_ids.h
@@ -166,7 +166,7 @@
#define NDPI_PROTOCOL_WEBEX 141
#define NDPI_PROTOCOL_VIBER 144
#define NDPI_PROTOCOL_RADIUS 146
-#define NDPI_PROTOCOL_WINDOWS_UPDATE 147 /* Thierry Laurion */
+#define NDPI_SERVICE_WINDOWS_UPDATE 147
#define NDPI_PROTOCOL_TEAMVIEWER 148 /* xplico.org */
#define NDPI_PROTOCOL_LOTUS_NOTES 150
#define NDPI_PROTOCOL_SAP 151
@@ -258,9 +258,10 @@
#define NDPI_SERVICE_TIMBETA 209
#define NDPI_SERVICE_DEEZER 210
#define NDPI_SERVICE_INSTAGRAM 211 /* Andrea Buscarinu <andrea.buscarinu@gmail.com> */
+#define NDPI_SERVICE_MICROSOFT 212
/* UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE */
-#define NDPI_LAST_IMPLEMENTED_PROTOCOL NDPI_SERVICE_INSTAGRAM
+#define NDPI_LAST_IMPLEMENTED_PROTOCOL NDPI_SERVICE_MICROSOFT
#define NDPI_MAX_SUPPORTED_PROTOCOLS (NDPI_LAST_IMPLEMENTED_PROTOCOL + 1)
#define NDPI_MAX_NUM_CUSTOM_PROTOCOLS (NDPI_NUM_BITS-NDPI_LAST_IMPLEMENTED_PROTOCOL)
diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc
index d15244c5e..a7442b8c9 100644
--- a/src/lib/ndpi_content_match.c.inc
+++ b/src/lib/ndpi_content_match.c.inc
@@ -7398,6 +7398,9 @@ ndpi_protocol_match host_match[] = {
{ "tim-geoportal.geoportal3d.com.br", "TIM_PortasAbertas", NDPI_SERVICE_TIMPORTASABERTAS, NDPI_PROTOCOL_ACCEPTABLE },
{ ".m4u.com.br", "TIM_Recarga", NDPI_SERVICE_TIMRECARGA, NDPI_PROTOCOL_ACCEPTABLE },
{ ".deezer.com", "Deezer", NDPI_SERVICE_DEEZER, NDPI_PROTOCOL_ACCEPTABLE },
+ { ".microsoft.com", "Microsoft", NDPI_SERVICE_MICROSOFT, NDPI_PROTOCOL_ACCEPTABLE },
+ { "update.microsoft.com", "WindowsUpdate", NDPI_SERVICE_WINDOWS_UPDATE, NDPI_PROTOCOL_ACCEPTABLE },
+ { ".windowsupdate.com", "WindowsUpdate", NDPI_SERVICE_WINDOWS_UPDATE, NDPI_PROTOCOL_ACCEPTABLE },
{ NULL, 0 }
};
@@ -7439,7 +7442,7 @@ ndpi_protocol_match content_match[] = {
{ "NSPlayer/", NULL, NDPI_CONTENT_WINDOWSMEDIA, NDPI_PROTOCOL_FUN },
{ "application/x-mms-framed", NULL, NDPI_CONTENT_MMS, NDPI_PROTOCOL_FUN },
{ "Xbox Live Client/", NULL, NDPI_PROTOCOL_XBOX, NDPI_PROTOCOL_FUN },
- { "Windows-Update-Agent", NULL, NDPI_PROTOCOL_WINDOWS_UPDATE, NDPI_PROTOCOL_FUN },
+ { "Windows-Update-Agent", NULL, NDPI_SERVICE_WINDOWS_UPDATE, NDPI_PROTOCOL_ACCEPTABLE },
{ "audio/webm", NULL, NDPI_CONTENT_WEBM, NDPI_PROTOCOL_FUN },
{ "video/webm", NULL, NDPI_CONTENT_WEBM, NDPI_PROTOCOL_FUN },
{ "application/x-rtsp-tunnelled", NULL, NDPI_PROTOCOL_RTSP, NDPI_PROTOCOL_FUN },
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index ec2e320e5..fcc2b7304 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1436,11 +1436,6 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
no_master, "Radius",
ndpi_build_default_ports(ports_a, 1812, 1813, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 1812, 1813, 0, 0, 0) /* UDP */);
- ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_WINDOWS_UPDATE,
- no_master,
- no_master, "WindowsUpdate",
- ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
- ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_TEAMVIEWER,
no_master,
no_master, "TeamViewer",
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index aea36a634..583adb341 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -516,9 +516,6 @@ static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *nd
static void http_bitmask_exclude(struct ndpi_flow_struct *flow)
{
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_HTTP);
-#ifdef NDPI_PROTOCOL_WINDOWS_UPDATE
- NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_WINDOWS_UPDATE);
-#endif
#ifdef NDPI_CONTENT_MPEG
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_CONTENT_MPEG);
#endif
@@ -1084,15 +1081,6 @@ void init_http_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int
ADD_TO_DETECTION_BITMASK);
*id += 1;
#endif
-#ifdef NDPI_PROTOCOL_WINDOWS_UPDATE
- ndpi_set_bitmask_protocol_detection("WindowsUpdate", ndpi_struct, detection_bitmask, *id,
- NDPI_PROTOCOL_WINDOWS_UPDATE,
- ndpi_search_http_tcp,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD,
- NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK);
- *id += 1;
-#endif
#ifdef NDPI_PROTOCOL_QQ
ndpi_set_bitmask_protocol_detection("QQ", ndpi_struct, detection_bitmask, *id,
NDPI_PROTOCOL_QQ,