Mercurial > dropbear
diff packet.c @ 448:9c61e7af0156
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.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 24 Jul 2007 15:40:23 +0000 |
parents | 695413c59b6a |
children | 4cab61369879 |
line wrap: on
line diff
--- a/packet.c Thu Jul 19 15:54:18 2007 +0000 +++ b/packet.c Tue Jul 24 15:40:23 2007 +0000 @@ -212,7 +212,7 @@ 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 @@ /* 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"); }