Fix return value of ndpi_match_string_subprotocol() (#1230)

This commit is contained in:
Ivan Nardi
2021-07-06 18:55:14 +02:00
committed by GitHub
parent 1ee7355b91
commit 58665e93a9
+1 -1
View File
@@ -6682,7 +6682,7 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_str,
rc = ndpi_match_string_common(((AC_AUTOMATA_t *) automa->ac_automa),
string_to_match,string_to_match_len, &ret_match->protocol_id,
&ret_match->protocol_category, &ret_match->protocol_breed);
return rc < 0 ? rc : ret_match->protocol_id;
return rc < 0 ? NDPI_PROTOCOL_UNKNOWN : ret_match->protocol_id;
}
/* **************************************** */