comparison svr-tcpfwd.c @ 941:5daedffd0769

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.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 16 Jul 2014 22:53:32 +0800
parents 4ad38e223ccd
children 4121ca987e6a
comparison
equal deleted inserted replaced
940:e9dfb6d15193 941:5daedffd0769
51 51
52 #ifdef ENABLE_SVR_REMOTETCPFWD 52 #ifdef ENABLE_SVR_REMOTETCPFWD
53 static const struct ChanType svr_chan_tcpremote = { 53 static const struct ChanType svr_chan_tcpremote = {
54 1, /* sepfds */ 54 1, /* sepfds */
55 "forwarded-tcpip", 55 "forwarded-tcpip",
56 NULL, 56 tcp_prio_inithandler,
57 NULL, 57 NULL,
58 NULL, 58 NULL,
59 NULL 59 NULL
60 }; 60 };
61 61
238 char portstring[NI_MAXSERV]; 238 char portstring[NI_MAXSERV];
239 int sock; 239 int sock;
240 int len; 240 int len;
241 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; 241 int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
242 242
243 TRACE(("newtcpdirect channel %d", channel->index))
244
243 if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) { 245 if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) {
244 TRACE(("leave newtcpdirect: local tcp forwarding disabled")) 246 TRACE(("leave newtcpdirect: local tcp forwarding disabled"))
245 goto out; 247 goto out;
246 } 248 }
247 249
279 281
280 /* We don't set readfd, that will get set after the connection's 282 /* We don't set readfd, that will get set after the connection's
281 * progress succeeds */ 283 * progress succeeds */
282 channel->writefd = sock; 284 channel->writefd = sock;
283 channel->initconn = 1; 285 channel->initconn = 1;
286
287 channel->prio = DROPBEAR_CHANNEL_PRIO_UNKNOWABLE;
284 288
285 err = SSH_OPEN_IN_PROGRESS; 289 err = SSH_OPEN_IN_PROGRESS;
286 290
287 out: 291 out:
288 m_free(desthost); 292 m_free(desthost);