Mercurial > dropbear
diff common-kex.c @ 996:47643024fc90
Disable non-delayed zlib for server
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 28 Jan 2015 21:38:27 +0800 |
parents | ed85797bbc85 |
children | a1e79ffa5862 |
line wrap: on
line diff
--- a/common-kex.c Sat Jan 24 00:05:26 2015 +0800 +++ b/common-kex.c Wed Jan 28 21:38:27 2015 +0800 @@ -238,14 +238,24 @@ void kexfirstinitialise() { ses.kexstate.donefirstkex = 0; -#ifndef DISABLE_ZLIB - if (opts.enable_compress) { - ses.compress_algos = ssh_compress; - } else +#ifdef DISABLE_ZLIB + ses.compress_algos = ssh_nocompress; +#else + switch (opts.compress_mode) + { + 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 - { - ses.compress_algos = ssh_nocompress; - } kexinitialise(); }