summaryrefslogtreecommitdiffstats
path: root/libssh/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/config.c')
-rw-r--r--libssh/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/config.c b/libssh/config.c
index e3a00ca..beb21fc 100644
--- a/libssh/config.c
+++ b/libssh/config.c
@@ -183,12 +183,14 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
switch (opcode) {
case SOC_HOST:
*parsing = 0;
+ char* lowerhost = (session->host) ? ssh_lowercase(session->host) : NULL;
for (p = ssh_config_get_str(&s, NULL); p && *p;
p = ssh_config_get_str(&s, NULL)) {
- if (match_hostname(session->host, p, strlen(p))) {
+ if (match_hostname(lowerhost, p, strlen(p))) {
*parsing = 1;
}
}
+ SAFE_FREE(lowerhost);
break;
case SOC_HOSTNAME:
p = ssh_config_get_str(&s, NULL);