From 4543385d107fcc5a7e8632e35d9a60bcc40cb4f4 Mon Sep 17 00:00:00 2001 From: Vitaly Lavrov Date: Mon, 5 Feb 2024 21:44:45 +0300 Subject: 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. --- src/lib/protocols/collectd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/protocols/collectd.c') diff --git a/src/lib/protocols/collectd.c b/src/lib/protocols/collectd.c index d4586d90a..f9ec9a783 100644 --- a/src/lib/protocols/collectd.c +++ b/src/lib/protocols/collectd.c @@ -105,7 +105,7 @@ static int ndpi_int_collectd_dissect_hostname(struct ndpi_flow_struct * const fl struct ndpi_packet_struct const * const packet, u_int16_t block_offset, u_int16_t block_length) { - return (ndpi_hostname_sni_set(flow, &packet->payload[4], block_length) == NULL); + return (ndpi_hostname_sni_set(flow, &packet->payload[4], block_length, NDPI_HOSTNAME_NORM_ALL) == NULL); } static int ndpi_int_collectd_dissect_username(struct ndpi_flow_struct * const flow, -- cgit v1.2.3