aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2021-07-06 18:55:14 +0200
committerGitHub <noreply@github.com>2021-07-06 18:55:14 +0200
commit58665e93a98d014b53d131b2481ccab074efc9ff (patch)
treeb53e855c5d18703d120609883dd507626e200ab6
parent1ee7355b919c841c85af802d0a1bb2a06eb5e1eb (diff)
Fix return value of ndpi_match_string_subprotocol() (#1230)
-rw-r--r--src/lib/ndpi_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 854666b7a..d014da328 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -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;
}
/* **************************************** */