aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2018-11-30 08:39:54 +0100
committerLuca <deri@ntop.org>2018-11-30 08:39:54 +0100
commitbae75c8f9b90c8655cc1e67c85a52e66f6121b52 (patch)
tree729a35b408a4fda6c65f4f3cecd9b5b997c347bc /src
parentc09284ba276a3caf9dd4a8d9440e35e2808d5551 (diff)
Fix for custom protocol load
Diffstat (limited to 'src')
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 0812e63ac..8ee2dd1a6 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4455,7 +4455,8 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct
if(flow->guessed_protocol_id >= (NDPI_MAX_SUPPORTED_PROTOCOLS-1)) {
/* This is a custom protocol and it has priority over everything else */
- ret.master_protocol = NDPI_PROTOCOL_UNKNOWN, ret.app_protocol = flow->guessed_host_protocol_id;
+ ret.master_protocol = NDPI_PROTOCOL_UNKNOWN,
+ ret.app_protocol = flow->guessed_protocol_id ? flow->guessed_protocol_id : flow->guessed_host_protocol_id;
ndpi_fill_protocol_category(ndpi_struct, flow, &ret);
return(ret);
}