diff options
-rw-r--r-- | src/lib/ndpi_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 2f0dea90c..3a27ff740 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -7947,7 +7947,10 @@ ndpi_protocol ndpi_guess_undetected_protocol_v4(struct ndpi_detection_module_str return ret; if((proto == IPPROTO_TCP) || (proto == IPPROTO_UDP)) { - rc = ndpi_search_tcp_or_udp_raw(ndpi_str, flow, proto, shost, dhost); + if(shost && dhost) + rc = ndpi_search_tcp_or_udp_raw(ndpi_str, flow, proto, shost, dhost); + else + rc = NDPI_PROTOCOL_UNKNOWN; if(rc != NDPI_PROTOCOL_UNKNOWN) { ret.app_protocol = rc, |