diff common-kex.c @ 885:19ce21bd198a

Fix failing rekeying when we receive a still-in-flight packet
author Matt Johnston <matt@ucc.asn.au>
date Thu, 23 Jan 2014 21:56:35 +0800
parents ff597bf2cfb0
children cbc73a5aefb0
line wrap: on
line diff
--- a/common-kex.c	Fri Jan 17 21:42:32 2014 +0800
+++ b/common-kex.c	Thu Jan 23 21:56:35 2014 +0800
@@ -483,9 +483,6 @@
  * and we calculate the first portion of the key-exchange-hash for used
  * later in the key exchange. No response is sent, as the client should
  * initiate the diffie-hellman key exchange */
-
-/* Originally from kex.c, generalized for cli/svr mode --mihnea  */
-/* Belongs in common_kex.c where it should be moved after review */
 void recv_msg_kexinit() {
 	
 	unsigned int kexhashbuf_len = 0;
@@ -528,7 +525,7 @@
 		/* I_S, the payload of the server's SSH_MSG_KEXINIT */
 	    buf_setpos(ses.payload, 0);
 	    buf_putstring(ses.kexhashbuf, ses.payload->data, ses.payload->len);
-
+		ses.requirenext[0] = SSH_MSG_KEXDH_REPLY;
 	} else {
 		/* SERVER */