Matt Johnston
1c8f00bd59
Leave non-interactive at default QoS class
...
Lower class levels are less well defined, and non-interactive
SSH can carry various different types of applications.
This change also sets lowdelay class (AF21) earlier in an an outbound
dbclient session
2022-01-27 14:34:10 +08:00
Matt Johnston
a7ef149463
Bring back recently removed channel->flushing
...
This resolves the "sleep 10&echo hello" case which should
return immediately
2021-10-14 20:55:15 +08:00
Matt Johnston
f17400e738
Replace ChanType.sepfds with Channel.bidir_fd
...
This handles the case where a svrchansess has separate FDs
for nopty, but a single FD for pty mode.
The use of sepfds was also previously incorrect for X11 and
agent forwarding
2021-10-11 15:42:14 +08:00
Matt Johnston
8e6f73e879
- Remove "flushing" handling for exited processes, it should be
...
handled by normal file descriptor reads.
- Fix sesscheckclose() handling if a channel was closed before a
process was ever launched
2021-10-11 15:16:54 +08:00
Matt Johnston
7c2470ba3a
Fix some outdated comments
2021-10-11 15:14:46 +08:00
Matt Johnston
3c2f113a78
Return errstring on connect failure
2021-03-05 21:13:20 +08:00
Matt Johnston
fe992bf4ea
Split ChanType closehandler() and cleanup() so that dbclient doesn't
...
lose exit status messages
2018-11-14 22:57:56 +08:00
Francois Perrad
89e64c631e
Pointer parameter could be declared as pointing to const
2017-08-19 17:16:13 +02:00
Francois Perrad
f208d7920c
remove duplicated include
2016-11-15 15:31:50 +01:00
Matt Johnston
32a28d0d9c
Convert #ifdef to #if, other build changes
2016-05-04 15:33:40 +02:00
Matt Johnston
a3049d6433
Fix "Avoid queueing into circbuffer when the channel is about to close"
...
which broken handling EAGAIN/EINTR
2015-11-27 22:19:08 +08:00
Matt Johnston
ee353847be
Fix ses.channel_signal_pending race
2015-11-27 21:26:43 +08:00
Matt Johnston
90c3a74b2a
Avoid queueing into circbuffer when the channel is about to close
2015-11-19 23:52:52 +08:00
Matt Johnston
85d9672e47
Send SSH_OPEN_RESOURCE_SHORTAGE response when too many channels open
...
rather than SSH_OPEN_UNKNOWN_CHANNEL_TYPE
2015-11-19 22:39:32 +08:00
Matt Johnston
e0ae527190
Only clear channel_signal_pending after handling all channels,
...
from Andrzej Szombierski
2015-11-17 20:53:30 +08:00
Matt Johnston
1a4db21fe4
buf_getstring and buf_putstring now use non-unsigned char*
2015-06-04 23:08:50 +08:00
Gaël PORTAY
1601a657d4
Turn send_msg_channel_open_failure()'s text and lang into const char *
2015-05-05 20:39:13 +02:00
Gaël PORTAY
50b14f696c
Turn start_send_channel_request()'s type argument into char *
2015-05-05 20:39:13 +02:00
Gaël PORTAY
224b16b247
Fix pointer differ in signess warnings [-Werror=pointer-sign]
2015-05-05 20:39:13 +02:00
Matt Johnston
19e1afbd1c
Fix no-writev fallback
2015-05-02 22:47:25 +08:00
Matt Johnston
ef20b9ff7a
Avoid channel writev() when there is nothing to write
2015-03-21 22:43:08 +08:00
Matt Johnston
275611fbaa
Make main socket nonblocking. Limit writequeue size.
2015-03-20 23:36:42 +08:00
Matt Johnston
20f9683ae0
avoid malloc for iovec
2015-03-20 22:53:32 +08:00
Matt Johnston
989c5c1436
Avoid copying data into circular buffer
...
--HG--
branch : nocircbuffer
2015-03-01 00:44:45 +08:00
Matt Johnston
31e379c300
merge from default
...
--HG--
branch : fastopen
2015-02-28 09:06:40 +08:00
Matt Johnston
4b1f5ec7c2
Use m_close() which will avoid close(-1)
2015-02-24 20:53:32 +08:00
Thorsten Horstmann
ab9439519a
Fix for old compilers, variable declarations at beginning of functions
...
and /**/ comments
2015-02-24 20:51:18 +08:00
Matt Johnston
364a53577e
Move generic network routines to netio.c
...
--HG--
branch : fastopen
2015-02-20 23:16:38 +08:00
Matt Johnston
755c1458f0
async connections working
...
--HG--
branch : fastopen
2015-02-18 22:46:15 +08:00
Matt Johnston
6d2d3669f3
Make keepalive handling more robust, this should now match what OpenSSH does
2014-08-19 23:08:56 +08:00
Matt Johnston
0e7409c7ff
Make sure the check_close() handler runs when a server child process exits
2014-07-28 23:23:49 +08:00
Matt Johnston
5cf83a7212
Avoid use-after-free when channel inithandler fails. Thanks to Coverity
2014-07-26 10:18:55 +08:00
Matt Johnston
da57dd13c5
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.
2014-07-16 22:53:32 +08:00
Matt Johnston
1ccac01cee
Make sure client exit messages don't get lost
2014-07-09 00:13:17 +08:00
Matt Johnston
50a5d3756f
Send a failure response if a client receives a global request
2014-07-08 21:59:36 +08:00
Matt Johnston
ca86726f9f
Improve handling lots of concurrent forwarded connections. Increase
...
connection backlog, avoid check_close() for channels that haven't had IO
2014-06-25 23:42:39 +08:00
Matt Johnston
bb7934bf04
A few fixes for cases where compression increases payload sizes, and
...
be more precise about maximum channel sizes
2014-02-22 18:02:09 +08:00
Matt Johnston
bf6f3f613d
Read (and enqueue) packets from interactive input even when
...
we're waiting for a key exchange.
This should hopefully fix the situation where "~." doesn't work to terminate a
client session when a laptop wakes up. The client will be stuck waiting for a
key exchange on a dead connection, so won't have read the escape character
2014-02-17 21:41:06 +08:00
Matt Johnston
dffb33cecf
Improve EOF handling for half-close. Patch from Catalin Patulea
...
Fixes the situation
$ ./dbclient root@1.2.3.4 'cat; echo foo'
^D
<no output>
2013-09-21 00:17:22 +08:00
Matt Johnston
c0d7c6693f
run closehandlers on cleanup
2013-04-10 21:32:55 +08:00
Matt Johnston
90cf7f012c
Move the more verbose TRACE() statements into TRACE2()
2013-04-01 00:07:26 +08:00
Matt Johnston
5996c3824c
Add ~. and ~^Z handling to exit/suspend dbclient
2013-03-23 23:16:06 +08:00
Matt Johnston
804a1e69f2
use an empty writebuf rather than a NULL one
2013-03-20 22:31:07 +08:00
Matt Johnston
4fd4fbc255
Fix memory leak when direct TCP connections time out on connection.
...
Long-standing bug probably stemming from the awkwardly named
delete_channel() versus remove_channel()
2013-03-19 23:54:32 +08:00
Matt Johnston
2a02c4084a
- Don't sent SSH_MSG_UNIMPLEMENTED if we don't have ENABLE_SVR_REMOTETCPFWD
...
- Fix build if ENABLE_SVR_REMOTETCPFWD is disabled but ENABLE_SVR_LOCALTCPFWD
is enabled
2012-05-09 20:33:16 +08:00
Matt Johnston
baa32218b0
- Make sure we don't use channel-specific data after it has been freed
...
with a ChanType->closehandler()
2011-12-04 05:27:29 +08:00
Matt Johnston
38ed870ffe
Improve capitalisation for all logged strings
...
--HG--
extra : convert_revision : 997e53cec7a9efb7413ac6e17b6be60a5597bd2e
2011-02-23 15:50:30 +00:00
Matt Johnston
adc4d0194f
Idle timeout patch from Farrell Aultman. Needs testing, unsure if server
...
code works
--HG--
extra : convert_revision : ff66e05ae040561110af70114bf83f11ed528f05
2008-11-07 14:11:06 +00:00
Matt Johnston
ed79abed76
Don't use // style comments
...
--HG--
extra : convert_revision : c92c7b4fef739b505d9842b45a393e1089097e3b
2008-11-02 12:01:39 +00:00
Matt Johnston
b98d13effb
Don't send anything in response to a SSH_MSG_CHANNEL_REQUEST if we have
...
already sent a SSH_MSG_CHANNEL_CLOSE. This fixes a bug triggered by more
recent versions of putty with tcp fowarding and window adjustment request
messages.
--HG--
extra : convert_revision : 10b2f286b9886364db39dfbb4f8f46e49e345d87
2008-09-23 12:03:01 +00:00