summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/canohost.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-06-16 08:00:01 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-06-16 08:00:01 +0000
commit8432919c2ea4aea3fa64e5c5177ba4c5742df562 (patch)
tree1b3f0f653388b104a95d0817116cd19a5439698e /usr.bin/ssh/canohost.c
parent2e3d8feb783cb3e45c3a81ea6935fe9e5b17943a (diff)
don't exit if getpeername fails for forwarded ports; bugzilla #1054; ok djm
Diffstat (limited to 'usr.bin/ssh/canohost.c')
-rw-r--r--usr.bin/ssh/canohost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index 7b1f0c7419d..630a1ace7c2 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/canohost.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: canohost.c,v 1.42 2005/02/18 03:05:53 djm Exp $");
+RCSID("$OpenBSD: canohost.c,v 1.43 2005/06/16 08:00:00 markus Exp $");
#include "packet.h"
#include "xmalloc.h"
@@ -307,7 +307,7 @@ get_sock_port(int sock, int local)
} else {
if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
debug("getpeername failed: %.100s", strerror(errno));
- cleanup_exit(255);
+ return -1;
}
}
/* Return port number. */