aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-06-26 23:39:48 +0200
committerLuca Deri <deri@ntop.org>2020-06-26 23:39:48 +0200
commitb5f3facf7cab475ba805d0170760db52e025e13b (patch)
tree5cef2170e0f37b129a2235d78f24210e3d7c7dfd
parent8566288e43d0097f7739f1a9fc3eaa0631853ae6 (diff)
Added notes whenever a new flow risk is added
-rw-r--r--src/include/ndpi_typedefs.h5
-rw-r--r--src/lib/ndpi_utils.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index f81d80073..99b91d4be 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -52,8 +52,9 @@ typedef enum {
/*
NOTE
- When the typedef below is modified don't forget
- to update ndpi_risk2str (in ndpi_utils.c)
+ When the typedef below is modified don't forget to update
+ - ndpi_risk2str (in ndpi_utils.c)
+ - https://github.com/ntop/ntopng/blob/dev/scripts/lua/modules/flow_risk_utils.lua
*/
typedef enum {
NDPI_NO_RISK = 0,
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index 0eb399783..708ac38a0 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1503,6 +1503,7 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
case NDPI_MALFORMED_PACKET:
return("Malformed packet");
+
default:
snprintf(buf, sizeof(buf), "%d", (int)risk);
return(buf);