aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2015-05-19 08:14:52 +0200
committerLuca Deri <deri@ntop.org>2015-05-19 08:14:52 +0200
commitad28d5ff7b5d5793172032281a9527bac4e64a62 (patch)
tree0da81a98712bf4ee05eac72082da7740643731af /src/lib
parentc6d09df8846e6566d7d11b471732d11e15f8b93f (diff)
parent167c83121262c4621b56f1cb3927bf5f8a5f9a69 (diff)
Merge branch 'dev' of https://github.com/ntop/nDPI into dev
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ndpi_main.c2
-rw-r--r--src/lib/protocols/warcraft3.c2
-rw-r--r--src/lib/third_party/include/ndpi_patricia.h6
3 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 722984953..7719f766e 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4212,7 +4212,7 @@ unsigned int ndpi_detection_process_packet(struct ndpi_detection_module_struct *
flow->packet.tick_timestamp = d;
}
#else
- flow->packet.tick_timestamp = current_tick_l/1000;
+ flow->packet.tick_timestamp = (u_int32_t)current_tick_l/1000;
#endif
/* parse packet */
diff --git a/src/lib/protocols/warcraft3.c b/src/lib/protocols/warcraft3.c
index 7780dbf6e..39c93378e 100644
--- a/src/lib/protocols/warcraft3.c
+++ b/src/lib/protocols/warcraft3.c
@@ -43,7 +43,7 @@ void ndpi_search_warcraft3(struct ndpi_detection_module_struct
// struct ndpi_id_struct *src=ndpi_struct->src;
// struct ndpi_id_struct *dst=ndpi_struct->dst;
- u_int32_t l; /*
+ u_int16_t l; /*
Leave it as u_int32_t because otherwise 'u_int16_t temp'
might overflood it and thus generate an infinite loop
*/
diff --git a/src/lib/third_party/include/ndpi_patricia.h b/src/lib/third_party/include/ndpi_patricia.h
index bf4a86259..651e52fc9 100644
--- a/src/lib/third_party/include/ndpi_patricia.h
+++ b/src/lib/third_party/include/ndpi_patricia.h
@@ -44,7 +44,7 @@
#ifndef WIN32
#define PATRICIA_IPV6 HAVE_IPV6
#else
-#define PATRICIA_IPV6 0
+#undef PATRICIA_IPV6
#endif
/* typedef unsigned int u_int; */
@@ -142,7 +142,11 @@ void ndpi_Clear_Patricia (patricia_tree_t *patricia, void_fn_t func);
void ndpi_Destroy_Patricia (patricia_tree_t *patricia, void_fn_t func);
void ndpi_patricia_process (patricia_tree_t *patricia, void_fn2_t func);
+#ifdef WIN32
+#define PATRICIA_MAXBITS 128
+#else
#define PATRICIA_MAXBITS (sizeof(struct in6_addr) * 8)
+#endif
#define PATRICIA_NBIT(x) (0x80 >> ((x) & 0x7f))
#define PATRICIA_NBYTE(x) ((x) >> 3)