ndpiReader: fix collecting of risks statistics (#1192)

This commit is contained in:
Ivan Nardi
2021-06-01 16:50:46 +02:00
committed by GitHub
parent f4dbeecba9
commit 9d427faafe
+2
View File
@@ -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,
} }
} }
} }
}
/* *********************************************** */ /* *********************************************** */