Skip to content

Commit 5a3b963

Browse files
committed
Memory usage is way down. 1) I stopped over committing memory in sshbuf_allocate and
2) I changed PACKET_MAX_SIZE from a define at 256KB to a variable that is 256KB pre-auth (to handle large banners) to SSH_IOBUFSZ + 1KB post auth. My concerns about the aes-ctr-mt cipher being slow were not founded. I was testing the wrong version.
1 parent 5d93a1f commit 5a3b963

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packet.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@
117117
*/
118118
u_int packet_max_size = 256 * 1024;
119119

120+
/* global to support forced rekeying */
121+
int rekey_requested = 0;
122+
123+
120124
struct packet_state {
121125
u_int32_t seqnr;
122126
u_int32_t packets;
@@ -978,7 +982,6 @@ ssh_set_newkeys(struct ssh *ssh, int mode)
978982
}
979983

980984
/* this supports the forced rekeying required for the NONE cipher */
981-
int rekey_requested = 0;
982985
void
983986
packet_request_rekeying(void)
984987
{

0 commit comments

Comments
 (0)