diff options
author | Luca Deri <deri@ntop.org> | 2024-08-26 16:48:18 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-08-26 16:48:18 +0200 |
commit | 6fcd1ba9419da36587e7bb58cd9599f090fa42ab (patch) | |
tree | 5fae9431c8885fac1c28a547abc34783550d634a /src/lib | |
parent | c8f8d87bf91a26cfa23bbb0270c1d312e87b5841 (diff) |
ndpi_get_protocol_by_name now return UNKNoWN when one protocol (either master or app) is not recognized
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ndpi_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 4d33ace82..47314afe2 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -315,6 +315,9 @@ ndpi_master_app_protocol ndpi_get_protocol_by_name(struct ndpi_detection_module_ /* TLS.YouTube */ dot[0] = '\0'; ret.app_protocol = ndpi_get_proto_by_name(ndpi_str, &dot[1]); + + if(ret.app_protocol == NDPI_PROTOCOL_UNKNOWN) + return(ret); /* Parsing error */ } else { /* TLS */ } |