Commit Graph

43 Commits

Author SHA1 Message Date
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
14bdd5a8ae Use DSCP for IP QoS traffic classes
The previous TOS values are deprecated and not used by modern traffic
classifiers. This sets AF21 for "interactive" traffic (with a tty).
Non-tty traffic sets AF11 - that indicates high throughput but is not
lowest priority (which would be CS1 or LE).

This differs from the CS1 used by OpenSSH, it lets interactive git over SSH
have higher priority than background least effort traffic. Dropbear's settings
here should be suitable with the diffservs used by CAKE qdisc.
2022-01-25 17:32:20 +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
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
François Perrad
f042eb41ab more linting (#55)
* dropbear_exit: remove priority parameter

confusion with dropbear_log()

* const parameter
2018-02-17 11:27:37 +08:00
Francois Perrad
598056d168 Pointer parameter could be declared as pointing to const (callback) 2017-08-19 22:39:53 +02:00
Francois Perrad
89e64c631e Pointer parameter could be declared as pointing to const 2017-08-19 17:16:13 +02:00
Matt Johnston
32a28d0d9c Convert #ifdef to #if, other build changes 2016-05-04 15:33:40 +02:00
Francois Perrad
3e20c442de fix empty C prototypes 2016-03-16 22:41:20 +08:00
Gaël PORTAY
50b14f696c Turn start_send_channel_request()'s type argument into char * 2015-05-05 20:39:13 +02:00
Matt Johnston
275611fbaa Make main socket nonblocking. Limit writequeue size. 2015-03-20 23:36:42 +08:00
Matt Johnston
31e379c300 merge from default
--HG--
branch : fastopen
2015-02-28 09:06:40 +08:00
Thorsten Horstmann
abeb9d64a3 Some minor typo fixes, found by codespell. 2015-02-24 20:45:07 +08:00
Thorsten Horstmann
fdb7ffa864 DROPBEAR_ prefix for include guards to avoid collisions 2015-02-24 20:43:01 +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
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
50a5d3756f Send a failure response if a client receives a global request 2014-07-08 21:59:36 +08:00
Matt Johnston
5996c3824c Add ~. and ~^Z handling to exit/suspend dbclient 2013-03-23 23:16:06 +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
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
c6582dbe37 Make it compile, update for changes in channel structure.
--HG--
branch : agent-client
extra : convert_revision : 84676a98a0848224078a716b1292744a34e9d80c
2009-07-01 04:53:17 +00:00
Matt Johnston
2d4d9627a2 Rearrange the channel buffer sizes into three neat use-editable values in
options.h. Increasing RECV_MAX_WINDOW gives big network performance
increases - even with the present buffers (which haven't changed) it
performs a lot better.
Next step is to make the window size a cmdline option.

--HG--
extra : convert_revision : 24c7cb47fb56cf5b82e3bc0859b45ea83038eab0
2007-07-24 15:40:23 +00:00
Matt Johnston
f5ad5c1553 Improve behaviour when flushing out after a process has exited.
--HG--
branch : channel-fix
extra : convert_revision : e73ee8f7ae404a9355685c30828a0ad4524031bc
2007-02-09 10:43:16 +00:00
Matt Johnston
7e04c5e277 just shuffle some variables names about, a brief comment
about the "bad writefd" problem

--HG--
branch : channel-fix
extra : convert_revision : f0b407c3d3e047ed83174e6f4ebd85a19352df5b
2006-10-01 16:35:13 +00:00
Matt Johnston
b131f74533 * rename infd/outfd to writefd/readfd, to avoid confusion
--HG--
extra : convert_revision : e3e7dc2cf75ad60c83a5b4307c210fee2fe90434
2005-10-20 16:53:12 +00:00
Matt Johnston
18b082955b * ensure that we only handle open confirmation/failure
for channels where it is expected

--HG--
extra : convert_revision : acc1ba014aae08ecb3159282fe87defe67899a40
2005-09-05 17:10:32 +00:00
Matt Johnston
e7f579b75d common session initialiser doesn't need to call
chansessioninnitialise(), fix up header definition

--HG--
extra : convert_revision : 580bc5e6e1413daf46156a181259c244ce1ab174
2005-09-05 12:13:44 +00:00
Matt Johnston
20ceb493b6 channel.h: make definition extern
svr-authpam.c: be smarter comparing pam prompts

--HG--
extra : convert_revision : 6962b52a31b14eb017c838d5242f476e1726f84c
2005-07-29 05:37:20 +00:00
Matt Johnston
f45eafe342 * fix longstanding bug with connections being closed on failure to
connect to auth socket (server)
* differentiate between get_byte and get_bool
* get rid of some // comments
* general tidying

--HG--
extra : convert_revision : fb8d188ce33b6b45804a5ce51b9f601f83bdf3d7
2005-03-13 13:58:14 +00:00
Matt Johnston
e7677a5e8d Rearrange preprocessor parts so that compilation with various options
disabled works OK.

--HG--
extra : convert_revision : cc92f744e34125062d052b757967e167f19d6db5
2004-12-22 15:37:50 +00:00
Matt Johnston
34445aa819 Cleaning out various dead wood found with -dead_strip
bignum.c: mptobytes now resides in dss.c
loginrec.c: remove lastlog code since it isn't used.
dbutil.c: removed obselete usingsyslog variable
channel.h: client channel type only defined for client compile
common-algo.c: s/rijndael/aes/

--HG--
extra : convert_revision : 411ea4e70506ecb0202376f94bcf2d330603d042
2004-12-20 14:24:57 +00:00
Matt Johnston
636b041b9b 0.44test4 probably
also bumped the channel recv window sizing

--HG--
extra : convert_revision : 2ab172def950d852426cf2c2e066c29aa50e2de9
2004-09-14 13:22:32 +00:00
Matt Johnston
51a74b4799 - added circular buffering for channels
- added stderr support for the client
- cleaned up a bunch of "unused" warnings, duplicated header definitions
- added exit-status support for the client

--HG--
extra : convert_revision : 5bdf806d8b440c87f7235414662f4189195618f4
2004-08-26 13:16:40 +00:00
Matt Johnston
2dcd6b22d9 Nasty.
--HG--
extra : convert_revision : e1229cd01c3007206d2937ea390ad4966c289a5a
2004-08-24 18:12:18 +00:00
Matt Johnston
8e1ec24f55 Merging in the changes from 0.41-0.43 main Dropbear tree
--HG--
extra : convert_revision : 4c3428781bc8faf0fd7cadd7099fbd7f4ea386e7
2004-08-12 16:41:58 +00:00
Matt Johnston
ae1b0b07cf Fixed stupid agentfwd error (using the listening FD, not the accepted on. gah)
--HG--
extra : convert_revision : 27e793a6395dbf5f2c0aa130d37fad2e4ef67e01
2004-06-03 18:08:34 +00:00
Matt Johnston
444dbb5364 - Reworked non-channel fd handling to listener.c
- More channel cleaning up

--HG--
extra : convert_revision : 385ec76d0304b93e277d1cc193383db5fd773703
2004-06-03 16:45:53 +00:00
Matt Johnston
513f947d62 Chantype handling is sorted
--HG--
extra : convert_revision : 807efead6ecf690f147fd8145aa9d78ff894cdb2
2004-06-02 04:59:49 +00:00
Matt Johnston
674a607488 Makefile.in contains updated files required
--HG--
extra : convert_revision : cc8a8c49dc70e632c352853a39801089b08149be
2004-06-01 02:46:09 +00:00