thread_index may by negative. (#1814)
* thread_index may by negative. Like: 192.168.8.155:55848 --> 183.3.224.139 * reader thread index also need to uint32
This commit is contained in:
@@ -137,7 +137,7 @@ struct nDPI_workflow {
|
||||
struct nDPI_reader_thread {
|
||||
struct nDPI_workflow * workflow;
|
||||
pthread_t thread_id;
|
||||
int array_index;
|
||||
uint32_t array_index;
|
||||
};
|
||||
|
||||
static struct nDPI_reader_thread reader_threads[MAX_READER_THREADS] = {};
|
||||
@@ -549,7 +549,7 @@ static void ndpi_process_packet(uint8_t * const args,
|
||||
uint16_t l4_len = 0;
|
||||
|
||||
uint16_t type;
|
||||
int thread_index = INITIAL_THREAD_HASH; // generated with `dd if=/dev/random bs=1024 count=1 |& hd'
|
||||
uint32_t thread_index = INITIAL_THREAD_HASH; // generated with `dd if=/dev/random bs=1024 count=1 |& hd'
|
||||
|
||||
if (reader_thread == NULL) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user