mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
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
This commit is contained in:
4
packet.c
4
packet.c
@@ -212,7 +212,7 @@ static void read_packet_init() {
|
||||
buf_setpos(ses.readbuf, blocksize);
|
||||
|
||||
/* check packet length */
|
||||
if ((len > MAX_PACKET_LEN) ||
|
||||
if ((len > RECV_MAX_PACKET_LEN) ||
|
||||
(len < MIN_PACKET_LEN + macsize) ||
|
||||
((len - macsize) % blocksize != 0)) {
|
||||
dropbear_exit("bad packet size %d", len);
|
||||
@@ -281,7 +281,7 @@ void decrypt_packet() {
|
||||
/* payload length */
|
||||
/* - 4 - 1 is for LEN and PADLEN values */
|
||||
len = ses.decryptreadbuf->len - padlen - 4 - 1;
|
||||
if ((len > MAX_PAYLOAD_LEN) || (len < 1)) {
|
||||
if ((len > RECV_MAX_PAYLOAD_LEN) || (len < 1)) {
|
||||
dropbear_exit("bad packet size");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user