ndpiReader: fix collecting of risks statistics (#1192)
This commit is contained in:
@@ -2279,6 +2279,7 @@ void printPortStats(struct port_stats *stats) {
|
|||||||
static void node_flow_risk_walker(const void *node, ndpi_VISIT which, int depth, void *user_data) {
|
static void node_flow_risk_walker(const void *node, ndpi_VISIT which, int depth, void *user_data) {
|
||||||
struct ndpi_flow_info *f = *(struct ndpi_flow_info**)node;
|
struct ndpi_flow_info *f = *(struct ndpi_flow_info**)node;
|
||||||
|
|
||||||
|
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
|
||||||
if(f->risk) {
|
if(f->risk) {
|
||||||
u_int j;
|
u_int j;
|
||||||
|
|
||||||
@@ -2292,6 +2293,7 @@ static void node_flow_risk_walker(const void *node, ndpi_VISIT which, int depth,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* *********************************************** */
|
/* *********************************************** */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user