Renamed ndpi_util.c -> reader_util.c
Added crash fix with IPv6
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ CXX=@CXX@
|
||||
CFLAGS=-g -I../src/include @CFLAGS@
|
||||
LIBNDPI=../src/lib/libndpi.a
|
||||
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
|
||||
OBJS=ndpiReader.o ndpi_util.o
|
||||
OBJS=ndpiReader.o reader_util.o
|
||||
PREFIX?=@prefix@
|
||||
|
||||
all: ndpiReader @DPDK_TARGET@
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#include <json.h>
|
||||
#endif
|
||||
|
||||
#include "ndpi_util.h"
|
||||
#include "reader_util.h"
|
||||
|
||||
|
||||
/** Client parameters **/
|
||||
@@ -1582,7 +1582,6 @@ static void terminateDetection(u_int16_t thread_id) {
|
||||
* @brief Traffic stats format
|
||||
*/
|
||||
char* formatTraffic(float numBits, int bits, char *buf) {
|
||||
|
||||
char unit;
|
||||
|
||||
if(bits)
|
||||
@@ -3745,7 +3744,7 @@ int orginal_main(int argc, char **argv) {
|
||||
|
||||
/* Internal checks */
|
||||
automataUnitTest();
|
||||
serializerUnitTest();
|
||||
// serializerUnitTest();
|
||||
|
||||
gettimeofday(&startup_time, NULL);
|
||||
ndpi_info_mod = ndpi_init_detection_module();
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
#endif
|
||||
|
||||
#include "ndpi_main.h"
|
||||
#include "ndpi_util.h"
|
||||
#include "reader_util.h"
|
||||
|
||||
extern u_int8_t enable_protocol_guess;
|
||||
extern u_int8_t verbose;
|
||||
@@ -651,13 +651,10 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
|
||||
flow->last_seen = time;
|
||||
|
||||
if(verbose) {
|
||||
}
|
||||
|
||||
if(!flow->has_human_readeable_strings) {
|
||||
u_int8_t skip = 0;
|
||||
|
||||
if((iph->protocol == IPPROTO_TCP)
|
||||
if((proto == IPPROTO_TCP)
|
||||
&& (
|
||||
(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_SSL)
|
||||
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSL)
|
||||
@@ -677,7 +674,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
flow->has_human_readeable_strings = 1;
|
||||
}
|
||||
} else {
|
||||
if((iph->protocol == IPPROTO_TCP)
|
||||
if((proto == IPPROTO_TCP)
|
||||
&& (
|
||||
(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_SSL)
|
||||
|| (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSL)
|
||||
@@ -655,7 +655,7 @@ int ndpi_has_human_readeable_string(struct ndpi_detection_module_struct *ndpi_st
|
||||
|
||||
if(buffer_size <= 0)
|
||||
return(0);
|
||||
|
||||
|
||||
outbuf_len--;
|
||||
outbuf[outbuf_len] = '\0';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user