summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2006-07-11 18:50:49 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2006-07-11 18:50:49 +0000
commit08c0648542c379047cf09b0eee2f33d4d17cf40f (patch)
treea34bcb2706ce1e4eb7436020dd75ccd693ac730c /usr.bin/ssh/clientloop.c
parent449534206efec379c6c63b56bd7a56549ccf2ccd (diff)
add ExitOnForwardFailure: terminate the connection if ssh(1)
cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 98377bc7e67..a431b3d4e07 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.166 2006/07/08 21:47:12 stevesk Exp $ */
+/* $OpenBSD: clientloop.c,v 1.167 2006/07/11 18:50:47 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -992,9 +992,12 @@ process_cmdline(void)
goto out;
}
} else {
- channel_request_remote_forwarding(fwd.listen_host,
+ if (channel_request_remote_forwarding(fwd.listen_host,
fwd.listen_port, fwd.connect_host,
- fwd.connect_port);
+ fwd.connect_port) < 0) {
+ logit("Port forwarding failed.");
+ goto out;
+ }
}
logit("Forwarding port.");