diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-12-20 19:27:56 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-12-20 19:27:56 +0000 |
commit | 5b2559785c014f57a6281999842b154ecce1fb03 (patch) | |
tree | 322ef4bc1313d4303d9438716e4915665eecf379 | |
parent | e63b328257a872ded144bb52123262af31bd8236 (diff) |
cannot get ip for remote host if proxy_command is used
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 64cfec5c30d..00d8175a162 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.83 2000/11/30 22:53:35 markus Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.84 2000/12/20 19:27:55 markus Exp $"); #include <openssl/bn.h> #include <openssl/dsa.h> @@ -500,10 +500,14 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, if (options.proxy_command != NULL && options.check_host_ip) options.check_host_ip = 0; - if (getnameinfo(hostaddr, hostaddr->sa_len, ntop, sizeof(ntop), - NULL, 0, NI_NUMERICHOST) != 0) - fatal("check_host_key: getnameinfo failed"); - ip = xstrdup(ntop); + if (options.proxy_command == NULL) { + if (getnameinfo(hostaddr, hostaddr->sa_len, ntop, sizeof(ntop), + NULL, 0, NI_NUMERICHOST) != 0) + fatal("check_host_key: getnameinfo failed"); + ip = xstrdup(ntop); + } else { + ip = xstrdup("<no hostip for proxy command>"); + } /* * Store the host key from the known host file in here so that we can |