Commit Graph

53 Commits

Author SHA1 Message Date
Petr Štetiar
2864c3d154 Make IP Type-Of-Service feature optional
Add new -z commandline option which when set, disables new IP TOS
feature.

References: https://github.com/openwrt/openwrt/issues/10405
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-11-10 11:58:43 +08:00
Matt Johnston
ebb4018889 Merge netio changes 2022-01-27 15:09:29 +08:00
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
a4362d3019 Test for IP_TOS and hardcode DSCP values
This allows it to work on macos too
2022-01-25 17:57:05 +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
f3a4ea511b 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
d0d1ede191 fuzz: fix crash in newtcpdirect(), don't close the channel too early 2021-03-05 22:51:11 +08:00
Matt Johnston
8b0fdf8010 Small cleanups of netio allocated port 2021-03-04 21:02:16 +08:00
Guillaume Picquet
934cc87db3
Update netio.c (#115)
Moved allocated_lport_p and allocated_lport at begin of block to buld in C89
2021-03-04 20:50:13 +08:00
Matt Johnston
e12ff23e7d fuzz: add an always-failing dropbear_listen() replacement 2020-12-06 21:54:01 +08:00
Matt Johnston
8ec9016585 Add server postauth fuzzer, wrap connect_remote() 2020-11-13 23:18:05 +08:00
Kazuo Kuroi
ec993dbdbc Set IOV_MAX for IRIX 2020-06-10 22:09:29 +08:00
Matt Johnston
4faf06aae7 Don't warn when SO_PRIORITY fails 2020-05-28 23:26:34 +08:00
karel-m
16fb0b0d53 cygwin competibility fix (#64) 2019-03-20 23:05:37 +08:00
Matt Johnston
ffde4a524f Remove some cluttering TRACE printouts 2018-11-14 22:52:04 +08:00
Matt Johnston
7f15910541 get rid of unused packet_type in encrypted write queue 2018-03-04 14:57:18 +08:00
Matt Johnston
c658b275fd - #if not #ifdef for DROPBEAR_FUZZ
- fix some unused variables

--HG--
branch : fuzz
2018-02-28 21:40:08 +08:00
Matt Johnston
7e8094d53a merge from main
--HG--
branch : fuzz
2018-02-17 19:29:51 +08:00
Francois Perrad
5bf1214859 use NULL instead of 0 2018-02-16 23:32:11 +08:00
Michael Witten
3ee685ad1c options: Complete the transition to numeric toggles (`#if')
For the sake of review, this commit alters only the code; the affiliated
comments within the source files also need to be updated, but doing so
now would obscure the operational changes that have been made here.

* All on/off options have been switched to the numeric `#if' variant;
  that is the only way to make this `default_options.h.in' thing work
  in a reasonable manner.

* There is now some very minor compile-time checking of the user's
  choice of options.

* NO_FAST_EXPTMOD doesn't seem to be used, so it has been removed.

* ENABLE_USER_ALGO_LIST was supposed to be renamed DROPBEAR_USER_ALGO_LIST,
  and this commit completes that work.

* DROPBEAR_FUZZ seems to be a relatively new, as-yet undocumented option,
  which was added by the following commit:

    commit 6e0b539e9c
    Author: Matt Johnston <matt@ucc.asn.au>
    Date:   Tue May 23 22:29:21 2017 +0800

        split out checkpubkey_line() separately

  It has now been added to `sysoptions.h' and defined as `0' by default.

* The configuration option `DROPBEAR_PASSWORD_ENV' is no longer listed in
  `default_options.h.in'; it is no longer meant to be set by the user, and
  is instead left to be defined in `sysoptions.h' (where it was already being
  defined) as merely the name of the environment variable in question:

    DROPBEAR_PASSWORD

  To enable or disable use of that environment variable, the user must now
  toggle `DROPBEAR_USE_DROPBEAR_PASSWORD'.

* The sFTP support is now toggled by setting `DROPBEAR_SFTPSERVER', and the
  path of the sFTP server program is set independently through the usual
  SFTPSERVER_PATH.
2018-02-16 23:13:47 +08:00
Matt Johnston
e4ac7ea1ca bind to port as well with -b 2018-01-26 00:28:25 +08:00
houseofkodai
9c7ecf6d14 cli_bind_address_connect
* replaces -b dummy option in dbclient to be similar with openssh -b option
* useful in multi-wan connections
2018-01-26 00:28:25 +08:00
houseofkodai
917722257d Server chosen tcpfwd ports (#43)
Server chosen tcpfwd ports
2018-01-25 22:21:41 +08:00
Francois Perrad
89e64c631e Pointer parameter could be declared as pointing to const 2017-08-19 17:16:13 +02:00
Matt Johnston
5ac4a71000 merge from main
--HG--
branch : fuzz
2017-06-24 00:47:07 +08:00
Matt Johnston
24b446705b test for linux/pkt-sched.h rather than SO_PRIORITY 2017-06-23 23:36:33 +08:00
Matt Johnston
4d07aa315b Disable setnonblocking(), get_socket_address(), set_sock_priority()
for fuzzing

--HG--
branch : fuzz
2017-05-26 22:10:51 +08:00
Matt Johnston
fdc6f32392 closer to working
--HG--
branch : fuzz
2017-05-20 13:23:16 +08:00
Matt Johnston
4dae8edb76 merge main to fuzz
--HG--
branch : fuzz
2017-05-18 23:45:10 +08:00
Matt Johnston
d7471c4f87 notsocket changes from afl branch
--HG--
branch : fuzz
2017-05-12 22:14:49 +08:00
Matt Johnston
dd19d73db4 make sure socket is of the right domain 2016-06-19 20:38:38 +08:00
Matt Johnston
32a28d0d9c Convert #ifdef to #if, other build changes 2016-05-04 15:33:40 +02:00
Matt Johnston
2c73fd6fbf make sure socket is of the right domain 2016-06-19 20:38:38 +08:00
Matt Johnston
9e379835c4 avoid invalidated iterator when connection fails 2015-09-29 22:19:11 +08:00
Matt Johnston
0ac33d22f7 Don't try to send data on first ack packet of 3way handshake.
Cisco SSH on 15.4(3)M2 or similar can't handle it.
2015-08-03 20:53:37 +08:00
Matt Johnston
e7ac4c1ab3 Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
2015-06-04 22:25:28 +08:00
Matt Johnston
2a431cab03 separate client/server fastopen options 2015-05-29 23:19:11 +08:00
Gaël PORTAY
224b16b247 Fix pointer differ in signess warnings [-Werror=pointer-sign] 2015-05-05 20:39:13 +02:00
Matt Johnston
fee32054e6 Should be AF_UNSPEC not PF_UNSPEC 2015-04-17 20:59:32 +08:00
Matt Johnston
9754fdd995 fastopen code was totally broken 2015-04-14 20:43:54 +08:00
Matt Johnston
a070159cc5 Fix when iov queue is large 2015-03-20 23:33:45 +08:00
Matt Johnston
20f9683ae0 avoid malloc for iovec 2015-03-20 22:53:32 +08:00
Matt Johnston
dce384668b dropbear_assert() rather than assert() 2015-03-16 21:33:01 +08:00
Matt Johnston
67b4fa313e strdup strerror 2015-03-11 23:10:27 +08:00
Matt Johnston
5dff74109e Fix error handling for dbclient async connect 2015-03-03 20:53:00 +08:00
Matt Johnston
3113932151 Better failure handling 2015-02-28 23:49:39 +08:00
Matt Johnston
89c0b2a6d8 Add cleanup
--HG--
branch : fastopen
2015-02-28 23:15:23 +08:00
Matt Johnston
843953379c EINPROGRESS for sendmsg() means it's working OK
--HG--
branch : fastopen
2015-02-27 00:02:48 +08:00
Matt Johnston
2a90c1ca7e ignore any sendmsg() errors
--HG--
branch : fastopen
2015-02-26 23:43:12 +08:00
Matt Johnston
46845fd3e8 get rid of some unnecessary code
--HG--
branch : fastopen
2015-02-21 00:43:32 +08:00