aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/zeromq.c
diff options
context:
space:
mode:
authorCampus <campus@ntop.org>2016-10-03 14:36:51 +0200
committerCampus <campus@ntop.org>2016-10-03 14:36:51 +0200
commit7e8e243e68bc6bc4d979e03887d57d75fd36f00b (patch)
treef3aee961eccb4b6a7bfef71773eb390ae25605a2 /src/lib/protocols/zeromq.c
parentcf470ec03825fcd4deb58b4c43b39595dd044125 (diff)
fix check for issue https://github.com/ntop/nDPI/issues/272
Diffstat (limited to 'src/lib/protocols/zeromq.c')
-rw-r--r--src/lib/protocols/zeromq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/protocols/zeromq.c b/src/lib/protocols/zeromq.c
index 2f31eb815..f4780b334 100644
--- a/src/lib/protocols/zeromq.c
+++ b/src/lib/protocols/zeromq.c
@@ -1,7 +1,7 @@
/*
* zmq.c
*
- * Copyright (C) 2011-15 - ntop.org
+ * Copyright (C) 2016 - ntop.org
*
* nDPI is free software: you can zmqtribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -17,8 +17,6 @@
* along with nDPI. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
-
#include "ndpi_api.h"
#ifdef NDPI_PROTOCOL_ZMQ
@@ -30,6 +28,7 @@ static void ndpi_int_zmq_add_connection(struct ndpi_detection_module_struct *ndp
static void ndpi_check_zmq(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+
struct ndpi_packet_struct *packet = &flow->packet;
u_int32_t payload_len = packet->payload_packet_len;
u_char p0[] = { 0x00, 0x00, 0x00, 0x05, 0x01, 0x66, 0x6c, 0x6f, 0x77 };
@@ -50,7 +49,6 @@ static void ndpi_check_zmq(struct ndpi_detection_module_struct *ndpi_struct, str
memcpy(flow->l4.tcp.prev_zmq_pkt, packet->payload, flow->l4.tcp.prev_zmq_pkt_len);
return; /* Too early */
}
-
if(payload_len == 2) {
if(flow->l4.tcp.prev_zmq_pkt_len == 2) {
if((memcmp(packet->payload, "\01\01", 2) == 0)