ignore upper case in pref

This commit is contained in:
rakslice 2020-11-19 15:43:10 -08:00
parent a1ef6be18a
commit 5163e17f14
1 changed files with 8 additions and 2 deletions

View File

@ -72,8 +72,14 @@ int prepare_host_domain_suffixes(char * buf) {
if (buf) buf[pos] = '.';
pos++;
}
if (buf) strcpy(buf + pos, str);
pos += strlen(str);
if (buf) {
const char * str_pos = str;
while (*str_pos != '\0') {
buf[pos] = tolower(*str_pos);
++pos;
++str_pos;
}
};
// domain to be checked will be FQDN so suffix must have a trailing dot
if (str[strlen(str) - 1] != '.') {
if (buf) buf[pos] = '.';