Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep upper case characters in host names #935

Merged
merged 1 commit into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ void getAllQueries(const char *client_message, const int *sock)
// (if available) their host names
if((strcmp(getstr(forward->ippos), serv_addr) == 0 ||
(forward->namepos != 0 &&
strcmp(getstr(forward->namepos), serv_addr) == 0)) && forward->port == serv_port)
strcasecmp(getstr(forward->namepos), serv_addr) == 0)) && forward->port == serv_port)
{
forwarddestid = i;
break;
Expand Down Expand Up @@ -812,7 +812,7 @@ void getAllQueries(const char *client_message, const int *sock)
// Try to match the requested string
if(strcmp(getstr(client->ippos), clientname) == 0 ||
(client->namepos != 0 &&
strcmp(getstr(client->namepos), clientname) == 0))
strcasecmp(getstr(client->namepos), clientname) == 0))
{
clientid = i;

Expand Down
8 changes: 0 additions & 8 deletions src/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ char *resolveHostname(const char *addr)
{
// Return hostname copied to new memory location
hostname = strdup(he->h_name);

// Convert hostname to lower case
if(hostname != NULL)
strtolower(hostname);
}
else
{
Expand Down Expand Up @@ -241,10 +237,6 @@ char *resolveHostname(const char *addr)
{
// Return hostname copied to new memory location
hostname = strdup(he->h_name);

// Convert hostname to lower case
if(hostname != NULL)
strtolower(hostname);
}
else
{
Expand Down