summaryrefslogtreecommitdiff
path: root/mux.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-06-26 09:50:30 +1000
committerDamien Miller <djm@mindrot.org>2010-06-26 09:50:30 +1000
commit232cfb1b1d0dccee68b1d433e0b4e1aa74919fc9 (patch)
tree80907fc629d104e69a7886cff390cabfba077e7b /mux.c
parentd834d3583427981a395f8fc53346f9473b2e902c (diff)
- djm@cvs.openbsd.org 2010/06/25 07:14:46
[channels.c mux.c readconf.c readconf.h ssh.h] bz#1327: remove hardcoded limit of 100 permitopen clauses and port forwards per direction; ok markus@ stevesk@
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/mux.c b/mux.c
index 70c8d2ade..fdf0385e0 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.19 2010/06/17 07:07:30 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.20 2010/06/25 07:14:46 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -727,9 +727,7 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
727 } 727 }
728 728
729 if (ftype == MUX_FWD_LOCAL || ftype == MUX_FWD_DYNAMIC) { 729 if (ftype == MUX_FWD_LOCAL || ftype == MUX_FWD_DYNAMIC) {
730 if (options.num_local_forwards + 1 >= 730 if (channel_setup_local_fwd_listener(fwd.listen_host,
731 SSH_MAX_FORWARDS_PER_DIRECTION ||
732 channel_setup_local_fwd_listener(fwd.listen_host,
733 fwd.listen_port, fwd.connect_host, fwd.connect_port, 731 fwd.listen_port, fwd.connect_host, fwd.connect_port,
734 options.gateway_ports) < 0) { 732 options.gateway_ports) < 0) {
735 fail: 733 fail:
@@ -744,16 +742,14 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
744 } else { 742 } else {
745 struct mux_channel_confirm_ctx *fctx; 743 struct mux_channel_confirm_ctx *fctx;
746 744
747 if (options.num_remote_forwards + 1 >= 745 if (channel_request_remote_forwarding(fwd.listen_host,
748 SSH_MAX_FORWARDS_PER_DIRECTION ||
749 channel_request_remote_forwarding(fwd.listen_host,
750 fwd.listen_port, fwd.connect_host, fwd.connect_port) < 0) 746 fwd.listen_port, fwd.connect_host, fwd.connect_port) < 0)
751 goto fail; 747 goto fail;
752 add_remote_forward(&options, &fwd); 748 add_remote_forward(&options, &fwd);
753 fctx = xcalloc(1, sizeof(*fctx)); 749 fctx = xcalloc(1, sizeof(*fctx));
754 fctx->cid = c->self; 750 fctx->cid = c->self;
755 fctx->rid = rid; 751 fctx->rid = rid;
756 fctx->fid = options.num_remote_forwards-1; 752 fctx->fid = options.num_remote_forwards - 1;
757 client_register_global_confirm(mux_confirm_remote_forward, 753 client_register_global_confirm(mux_confirm_remote_forward,
758 fctx); 754 fctx);
759 freefwd = 0; 755 freefwd = 0;