summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-05-21 14:57:35 +1000
committerDamien Miller <djm@mindrot.org>2010-05-21 14:57:35 +1000
commit388f6fc48561851dcedd5433aff75f60af573fb2 (patch)
tree4ac7be863c3ba9be98df80c6d66953608cd77a6c /ssh.c
parentd530f5f471491b6be9edb58a063f2590e4dce48d (diff)
- markus@cvs.openbsd.org 2010/05/16 12:55:51
[PROTOCOL.mux clientloop.h mux.c readconf.c readconf.h ssh.1 ssh.c] mux support for remote forwarding with dynamic port allocation, use with LPORT=`ssh -S muxsocket -R0:localhost:25 -O forward somehost` feedback and ok djm@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ssh.c b/ssh.c
index ee224e9ff..228afecf4 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.337 2010/05/14 23:29:23 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.338 2010/05/16 12:55:51 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -327,6 +327,8 @@ main(int ac, char **av)
327 fatal("Multiplexing command already specified"); 327 fatal("Multiplexing command already specified");
328 if (strcmp(optarg, "check") == 0) 328 if (strcmp(optarg, "check") == 0)
329 muxclient_command = SSHMUX_COMMAND_ALIVE_CHECK; 329 muxclient_command = SSHMUX_COMMAND_ALIVE_CHECK;
330 else if (strcmp(optarg, "forward") == 0)
331 muxclient_command = SSHMUX_COMMAND_FORWARD;
330 else if (strcmp(optarg, "exit") == 0) 332 else if (strcmp(optarg, "exit") == 0)
331 muxclient_command = SSHMUX_COMMAND_TERMINATE; 333 muxclient_command = SSHMUX_COMMAND_TERMINATE;
332 else 334 else
@@ -877,9 +879,10 @@ ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt)
877 type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure", 879 type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",
878 rfwd->listen_port, rfwd->connect_host, rfwd->connect_port); 880 rfwd->listen_port, rfwd->connect_host, rfwd->connect_port);
879 if (type == SSH2_MSG_REQUEST_SUCCESS && rfwd->listen_port == 0) { 881 if (type == SSH2_MSG_REQUEST_SUCCESS && rfwd->listen_port == 0) {
882 rfwd->allocated_port = packet_get_int();
880 logit("Allocated port %u for remote forward to %s:%d", 883 logit("Allocated port %u for remote forward to %s:%d",
881 packet_get_int(), 884 rfwd->allocated_port,
882 rfwd->connect_host, rfwd->connect_port); 885 rfwd->connect_host, rfwd->connect_port);
883 } 886 }
884 887
885 if (type == SSH2_MSG_REQUEST_FAILURE) { 888 if (type == SSH2_MSG_REQUEST_FAILURE) {