This commit is contained in:
Campus
2016-10-03 14:36:51 +02:00
parent cf470ec038
commit 7e8e243e68
11 changed files with 767 additions and 741 deletions
+2 -4
View File
@@ -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)