comparison common-kex.c @ 454:7e43f5e473b9

- Add -K keepalive flag for dropbear and dbclient - Try to reduce the frequency of select() timeouts - Add a max receive window size of 1MB
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Aug 2007 15:12:06 +0000
parents b895f91c2ee6
children d58c478bd399
comparison
equal deleted inserted replaced
453:29953de278ae 454:7e43f5e473b9
186 } 186 }
187 187
188 /* Reset the kex state, ready for a new negotiation */ 188 /* Reset the kex state, ready for a new negotiation */
189 static void kexinitialise() { 189 static void kexinitialise() {
190 190
191 struct timeval tv;
192
193 TRACE(("kexinitialise()")) 191 TRACE(("kexinitialise()"))
194 192
195 /* sent/recv'd MSG_KEXINIT */ 193 /* sent/recv'd MSG_KEXINIT */
196 ses.kexstate.sentkexinit = 0; 194 ses.kexstate.sentkexinit = 0;
197 ses.kexstate.recvkexinit = 0; 195 ses.kexstate.recvkexinit = 0;
204 ses.kexstate.firstfollows = 0; 202 ses.kexstate.firstfollows = 0;
205 203
206 ses.kexstate.datatrans = 0; 204 ses.kexstate.datatrans = 0;
207 ses.kexstate.datarecv = 0; 205 ses.kexstate.datarecv = 0;
208 206
209 if (gettimeofday(&tv, 0) < 0) { 207 ses.kexstate.lastkextime = time(NULL);
210 dropbear_exit("Error getting time");
211 }
212 ses.kexstate.lastkextime = tv.tv_sec;
213 208
214 } 209 }
215 210
216 /* Helper function for gen_new_keys, creates a hash. It makes a copy of the 211 /* Helper function for gen_new_keys, creates a hash. It makes a copy of the
217 * already initialised hash_state hs, which should already have processed 212 * already initialised hash_state hs, which should already have processed