comparison 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
comparison
equal deleted inserted replaced
995:6fb4c010c448 996:47643024fc90
236 236
237 /* Set up the kex for the first time */ 237 /* Set up the kex for the first time */
238 void kexfirstinitialise() { 238 void kexfirstinitialise() {
239 ses.kexstate.donefirstkex = 0; 239 ses.kexstate.donefirstkex = 0;
240 240
241 #ifndef DISABLE_ZLIB 241 #ifdef DISABLE_ZLIB
242 if (opts.enable_compress) { 242 ses.compress_algos = ssh_nocompress;
243 ses.compress_algos = ssh_compress; 243 #else
244 } else 244 switch (opts.compress_mode)
245 {
246 case DROPBEAR_COMPRESS_DELAYED:
247 ses.compress_algos = ssh_delaycompress;
248 break;
249
250 case DROPBEAR_COMPRESS_ON:
251 ses.compress_algos = ssh_compress;
252 break;
253
254 case DROPBEAR_COMPRESS_OFF:
255 ses.compress_algos = ssh_nocompress;
256 break;
257 }
245 #endif 258 #endif
246 {
247 ses.compress_algos = ssh_nocompress;
248 }
249 kexinitialise(); 259 kexinitialise();
250 } 260 }
251 261
252 /* Reset the kex state, ready for a new negotiation */ 262 /* Reset the kex state, ready for a new negotiation */
253 static void kexinitialise() { 263 static void kexinitialise() {