diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.389 2013/10/23 03:05:19 djm Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.390 2013/10/24 08:19:36 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -913,9 +913,11 @@ main(int ac, char **av) | |||
913 | /* | 913 | /* |
914 | * If canonicalization not requested, or if it failed then try to | 914 | * If canonicalization not requested, or if it failed then try to |
915 | * resolve the bare hostname name using the system resolver's usual | 915 | * resolve the bare hostname name using the system resolver's usual |
916 | * search rules. | 916 | * search rules. Skip the lookup if a ProxyCommand is being used |
917 | * unless the user has specifically requested canonicalisation. | ||
917 | */ | 918 | */ |
918 | if (addrs == NULL) { | 919 | if (addrs == NULL && (options.proxy_command == NULL || |
920 | options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { | ||
919 | if ((addrs = resolve_host(host, options.port, 1, | 921 | if ((addrs = resolve_host(host, options.port, 1, |
920 | cname, sizeof(cname))) == NULL) | 922 | cname, sizeof(cname))) == NULL) |
921 | cleanup_exit(255); /* resolve_host logs the error */ | 923 | cleanup_exit(255); /* resolve_host logs the error */ |