aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/dns.c
diff options
context:
space:
mode:
authorVitaly Lavrov <vel21ripn@gmail.com>2024-02-05 21:44:45 +0300
committerGitHub <noreply@github.com>2024-02-05 19:44:45 +0100
commit4543385d107fcc5a7e8632e35d9a60bcc40cb4f4 (patch)
tree1832253db2bbfaef1949a879f3fe8a781977166f /src/lib/protocols/dns.c
parenta4da4467ace84aa7dba718a94b0714aeb101ed9a (diff)
Normalization of host_server_name (#2299)
* Normalization of host_server_name The ndpi_hostname_sni_set() function replaces all non-printable characters with the "?" character and removing whitespace characters at the end of the line. * Added conditional hostname normalization.
Diffstat (limited to 'src/lib/protocols/dns.c')
-rw-r--r--src/lib/protocols/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c
index 112c2ad50..64e3a38d8 100644
--- a/src/lib/protocols/dns.c
+++ b/src/lib/protocols/dns.c
@@ -764,7 +764,7 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st
u_int8_t hostname_is_valid = ndpi_grab_dns_name(packet, &off, _hostname, sizeof(_hostname), &len, is_mdns);
- ndpi_hostname_sni_set(flow, (const u_int8_t *)_hostname, len);
+ ndpi_hostname_sni_set(flow, (const u_int8_t *)_hostname, len, is_mdns ? NDPI_HOSTNAME_NORM_LC : NDPI_HOSTNAME_NORM_ALL);
if (hostname_is_valid == 0)
ndpi_set_risk(ndpi_struct, flow, NDPI_INVALID_CHARACTERS, NULL);