From 2f347a33d8564ebb9f2bf42d344398912f682898 Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 11 Jul 2015 16:04:58 +0200 Subject: Fixes for issues #40 -> #52 Implemented sub-protocol detection for SSL/HTTP/HTTPS --- src/lib/protocols/dns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/protocols/dns.c') diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c index 089ea913d..787f9f4d7 100644 --- a/src/lib/protocols/dns.c +++ b/src/lib/protocols/dns.c @@ -265,9 +265,10 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd #endif if(ndpi_struct->match_dns_host_names) - ndpi_match_string_subprotocol(ndpi_struct, flow, + ndpi_match_host_subprotocol(ndpi_struct, flow, (char *)flow->host_server_name, - strlen((const char*)flow->host_server_name)); + strlen((const char*)flow->host_server_name), + NDPI_PROTOCOL_DNS); } i++; @@ -284,7 +285,7 @@ void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, struct nd if(packet->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) { /* - Do not set the protocol with DNS if ndpi_match_string_subprotocol() has + Do not set the protocol with DNS if ndpi_match_host_subprotocol() has matched a subprotocol */ NDPI_LOG(NDPI_PROTOCOL_DNS, ndpi_struct, NDPI_LOG_DEBUG, "found DNS.\n"); -- cgit v1.2.3