summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-02 15:28:40 +1000
committerDamien Miller <djm@mindrot.org>2014-07-02 15:28:40 +1000
commit19439e9a2a0ac0b4b3b1210e89695418beb1c883 (patch)
treeaf674eb1683d939d284f8b055dc1b4689920a47e /ssh.c
parent8668706d0f52654fe64c0ca41a96113aeab8d2b8 (diff)
- djm@cvs.openbsd.org 2014/06/24 02:19:48
[ssh.c] don't fatal() when hostname canonicalisation fails with a ProxyCommand in use; continue and allow the ProxyCommand to connect anyway (e.g. to a host with a name outside the DNS behind a bastion)
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ssh.c b/ssh.c
index d369b68e9..35fc7ddf9 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.402 2014/04/29 18:01:49 markus Exp $ */ 1/* $OpenBSD: ssh.c,v 1.403 2014/06/24 02:19:48 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
@@ -930,10 +930,14 @@ main(int ac, char **av)
930 if (addrs == NULL && options.num_permitted_cnames != 0 && 930 if (addrs == NULL && options.num_permitted_cnames != 0 &&
931 (option_clear_or_none(options.proxy_command) || 931 (option_clear_or_none(options.proxy_command) ||
932 options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) { 932 options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) {
933 if ((addrs = resolve_host(host, options.port, 1, 933 if ((addrs = resolve_host(host, options.port,
934 cname, sizeof(cname))) == NULL) 934 option_clear_or_none(options.proxy_command),
935 cleanup_exit(255); /* resolve_host logs the error */ 935 cname, sizeof(cname))) == NULL) {
936 check_follow_cname(&host, cname); 936 /* Don't fatal proxied host names not in the DNS */
937 if (option_clear_or_none(options.proxy_command))
938 cleanup_exit(255); /* logged in resolve_host */
939 } else
940 check_follow_cname(&host, cname);
937 } 941 }
938 942
939 /* 943 /*