summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-01-02 00:32:08 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-01-02 00:32:08 +0000
commitbcc2ac6393debd59e174402b7b05e6b9ec5cf662 (patch)
treeb17194cf085e553065c5cce3ebfc7b43b9412be8 /usr.bin
parent332ec6f105ffed563c0be081683ff801cebf0604 (diff)
channel_setup_local_fwd_listener() returns 0 on failure, not -ve
bz#2055 reported by mathieu.lacage AT gmail.com
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/clientloop.c6
-rw-r--r--usr.bin/ssh/mux.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index d7ec61db7d2..48da1e9b601 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.247 2012/09/07 06:34:21 dtucker Exp $ */
+/* $OpenBSD: clientloop.c,v 1.248 2013/01/02 00:32:07 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -959,9 +959,9 @@ process_cmdline(void)
goto out;
}
if (local || dynamic) {
- if (channel_setup_local_fwd_listener(fwd.listen_host,
+ if (!channel_setup_local_fwd_listener(fwd.listen_host,
fwd.listen_port, fwd.connect_host,
- fwd.connect_port, options.gateway_ports) < 0) {
+ fwd.connect_port, options.gateway_ports)) {
logit("Port forwarding failed.");
goto out;
}
diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c
index 57b28a1fd75..2983eb0f7f1 100644
--- a/usr.bin/ssh/mux.c
+++ b/usr.bin/ssh/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.37 2012/08/17 00:45:45 dtucker Exp $ */
+/* $OpenBSD: mux.c,v 1.38 2013/01/02 00:32:07 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -721,9 +721,9 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
}
if (ftype == MUX_FWD_LOCAL || ftype == MUX_FWD_DYNAMIC) {
- if (channel_setup_local_fwd_listener(fwd.listen_host,
+ if (!channel_setup_local_fwd_listener(fwd.listen_host,
fwd.listen_port, fwd.connect_host, fwd.connect_port,
- options.gateway_ports) < 0) {
+ options.gateway_ports)) {
fail:
logit("slave-requested %s failed", fwd_desc);
buffer_put_int(r, MUX_S_FAILURE);