summaryrefslogtreecommitdiffhomepage
path: root/svr-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-07-16 22:53:32 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-07-16 22:53:32 +0800
commitda57dd13c5352efd63c8692bbc12d19c9f882a2b (patch)
treeec18c7626bb47b3c4540f78d65d2a49b8a2d2fbf /svr-tcpfwd.c
parentf1826ea389bfddb6a0d52314d01e3d8b8f46eec8 (diff)
Set tcp priority as follows:
if (connecting || ptys || x11) tos = LOWDELAY; else if (tcp_forwards) tos = 0; else tos = BULK; TCP forwards could be either lowdelay or bulk, hence the default priority.
Diffstat (limited to 'svr-tcpfwd.c')
-rw-r--r--svr-tcpfwd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c
index 7033a65..e5f219e 100644
--- a/svr-tcpfwd.c
+++ b/svr-tcpfwd.c
@@ -53,7 +53,7 @@ static int newtcpdirect(struct Channel * channel);
static const struct ChanType svr_chan_tcpremote = {
1, /* sepfds */
"forwarded-tcpip",
- NULL,
+ tcp_prio_inithandler,
NULL,
NULL,
NULL
@@ -240,6 +240,8 @@ static int newtcpdirect(struct Channel * channel) {
int len;
int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
+ TRACE(("newtcpdirect channel %d", channel->index))
+
if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) {
TRACE(("leave newtcpdirect: local tcp forwarding disabled"))
goto out;
@@ -281,6 +283,8 @@ static int newtcpdirect(struct Channel * channel) {
* progress succeeds */
channel->writefd = sock;
channel->initconn = 1;
+
+ channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
err = SSH_OPEN_IN_PROGRESS;