diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-01-28 21:38:27 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-01-28 21:38:27 +0800 |
commit | a7a79d569a41b282da63c159fc8032b4472a2a73 (patch) | |
tree | 8eb7d57e766727bd1c8c720f2093f41adefa880d /common-kex.c | |
parent | 6165f53fcd6be9bb06fc3cd29e8640bb14d95111 (diff) |
Disable non-delayed zlib for server
Diffstat (limited to 'common-kex.c')
-rw-r--r-- | common-kex.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/common-kex.c b/common-kex.c index 65746a2..7d93708 100644 --- a/common-kex.c +++ b/common-kex.c @@ -238,14 +238,24 @@ void recv_msg_newkeys() { void kexfirstinitialise() { ses.kexstate.donefirstkex = 0; -#ifndef DISABLE_ZLIB - if (opts.enable_compress) { - ses.compress_algos = ssh_compress; - } else -#endif +#ifdef DISABLE_ZLIB + ses.compress_algos = ssh_nocompress; +#else + switch (opts.compress_mode) { - ses.compress_algos = ssh_nocompress; + case DROPBEAR_COMPRESS_DELAYED: + ses.compress_algos = ssh_delaycompress; + break; + + case DROPBEAR_COMPRESS_ON: + ses.compress_algos = ssh_compress; + break; + + case DROPBEAR_COMPRESS_OFF: + ses.compress_algos = ssh_nocompress; + break; } +#endif kexinitialise(); } |