ndpiReader: fix flow stats (#1943)
This commit is contained in:
@@ -818,7 +818,7 @@ static void parseOptions(int argc, char **argv) {
|
||||
for(i = 0; i < NDPI_MAX_SUPPORTED_PROTOCOLS; i++)
|
||||
aggressiveness[i] = -1; /* Use the default value */
|
||||
|
||||
while((opt = getopt_long(argc, argv, "a:Ab:B:e:Ec:C:dDf:g:i:Ij:k:K:S:hHp:pP:l:r:s:tu:v:V:n:rp:x:w:zZ:q0123:456:7:89:m:MT:U:",
|
||||
while((opt = getopt_long(argc, argv, "a:Ab:B:e:Ec:C:dDFf:g:i:Ij:k:K:S:hHp:pP:l:r:s:tu:v:V:n:rp:x:w:zZ:q0123:456:7:89:m:MT:U:",
|
||||
longopts, &option_idx)) != EOF) {
|
||||
#ifdef DEBUG_TRACE
|
||||
if(trace) fprintf(trace, " #### Handling option -%c [%s] #### \n", opt, optarg ? optarg : "");
|
||||
|
||||
@@ -983,7 +983,7 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow
|
||||
*src_to_dst_direction = 1;
|
||||
}
|
||||
if(enable_flow_stats) {
|
||||
if(src_to_dst_direction) {
|
||||
if(*src_to_dst_direction) {
|
||||
if(rflow->entropy->src2dst_pkt_count < max_num_packets_per_flow) {
|
||||
rflow->entropy->src2dst_pkt_len[rflow->entropy->src2dst_pkt_count] = l4_data_len;
|
||||
rflow->entropy->src2dst_pkt_time[rflow->entropy->src2dst_pkt_count] = when;
|
||||
|
||||
Reference in New Issue
Block a user