Reworked severities adding critical and emergency, thus shifting values down

This commit is contained in:
Luca Deri
2022-10-19 10:53:11 +02:00
parent 35fdbc8148
commit df0dd76ed2
17 changed files with 112 additions and 92 deletions
+16
View File
@@ -2003,6 +2003,14 @@ const char* ndpi_severity2str(ndpi_risk_severity s) {
case NDPI_RISK_SEVERE:
return("Severe");
break;
case NDPI_RISK_CRITICAL:
return("Critical");
break;
case NDPI_RISK_EMERGENCY:
return("Emergency");
break;
}
return("");
@@ -2043,6 +2051,14 @@ u_int16_t ndpi_risk2score(ndpi_risk risk,
case NDPI_RISK_SEVERE:
val = NDPI_SCORE_RISK_SEVERE;
break;
case NDPI_RISK_CRITICAL:
val = NDPI_SCORE_RISK_CRITICAL;
break;
case NDPI_RISK_EMERGENCY:
val = NDPI_SCORE_RISK_EMERGENCY;
break;
}
score += val;