comparison cli-session.c @ 753:d63ef1e211ea

Take transmit and receive keys into use separately
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Apr 2013 00:18:50 +0800
parents a813e2752fdb
children 2400b8685762
comparison
equal deleted inserted replaced
752:24172f555f9c 753:d63ef1e211ea
202 TRACE(("leave cli_sessionloop: done with KEXINIT_RCVD")) 202 TRACE(("leave cli_sessionloop: done with KEXINIT_RCVD"))
203 return; 203 return;
204 } 204 }
205 205
206 /* A KEX has finished, so we should go back to our KEX_NOTHING state */ 206 /* A KEX has finished, so we should go back to our KEX_NOTHING state */
207 if (cli_ses.kex_state != KEX_NOTHING && ses.kexstate.recvkexinit == 0 207 if (cli_ses.kex_state != KEX_NOTHING && ses.kexstate.sentnewkeys) {
208 && ses.kexstate.sentkexinit == 0) {
209 cli_ses.kex_state = KEX_NOTHING; 208 cli_ses.kex_state = KEX_NOTHING;
210 } 209 }
211 210
212 /* We shouldn't do anything else if a KEX is in progress */ 211 /* We shouldn't do anything else if a KEX is in progress */
213 if (cli_ses.kex_state != KEX_NOTHING) { 212 if (cli_ses.kex_state != KEX_NOTHING) {
216 } 215 }
217 216
218 if (ses.kexstate.donefirstkex == 0) { 217 if (ses.kexstate.donefirstkex == 0) {
219 /* We might reach here if we have partial packet reads or have 218 /* We might reach here if we have partial packet reads or have
220 * received SSG_MSG_IGNORE etc. Just skip it */ 219 * received SSG_MSG_IGNORE etc. Just skip it */
220 TRACE2(("donefirstkex false\n"))
221 return; 221 return;
222 } 222 }
223 223
224 switch (cli_ses.state) { 224 switch (cli_ses.state) {
225 225