diff options
author | 2015-01-30 10:44:49 +0000 | |
---|---|---|
committer | 2015-01-30 10:44:49 +0000 | |
commit | 5418fcd8116bc0a806cb9ee9317f74e8cb04476a (patch) | |
tree | 3b556267403d3bfe638a51a42407e635d75e5d8e /usr.bin/ssh/ssh-keyscan.c | |
parent | remove tenex transfer support. if you still have TOPS20 machines in (diff) | |
download | wireguard-openbsd-5418fcd8116bc0a806cb9ee9317f74e8cb04476a.tar.xz wireguard-openbsd-5418fcd8116bc0a806cb9ee9317f74e8cb04476a.zip |
set a timeout to prevent hangs when talking to busted servers;
ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 777be69c0c6..43f3de4dfa0 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.98 2015/01/30 01:13:33 djm Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.99 2015/01/30 10:44:49 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. * @@ -450,6 +450,7 @@ congreet(int s) *cp = '\0'; if ((c->c_ssh = ssh_packet_set_connection(NULL, s, s)) == NULL) fatal("ssh_packet_set_connection failed"); + ssh_packet_set_timeout(c->c_ssh, timeout, 1); ssh_set_app_data(c->c_ssh, c); /* back link */ if (sscanf(buf, "SSH-%d.%d-%[^\n]\n", &remote_major, &remote_minor, remote_version) == 3) |