changeset 1083:8e0280986710

Make sure kexfirstinitialise is called early enough
author Matt Johnston <matt@ucc.asn.au>
date Sun, 03 May 2015 00:00:35 +0800
parents 3cb73e8d6122
children 2265d7ebfdeb
files cli-session.c common-session.c svr-session.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cli-session.c	Sat May 02 22:59:55 2015 +0800
+++ b/cli-session.c	Sun May 03 00:00:35 2015 +0800
@@ -124,6 +124,8 @@
 	/* Exchange identification */
 	send_session_identification();
 
+	kexfirstinitialise(); /* initialise the kex state */
+
 	send_msg_kexinit();
 
 	session_loop(cli_sessionloop);
--- a/common-session.c	Sat May 02 22:59:55 2015 +0800
+++ b/common-session.c	Sun May 03 00:00:35 2015 +0800
@@ -90,8 +90,6 @@
 	ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[0]);
 	ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[1]);
 	
-	kexfirstinitialise(); /* initialise the kex state */
-
 	ses.writepayload = buf_new(TRANS_MAX_PAYLOAD_LEN);
 	ses.transseq = 0;
 
--- a/svr-session.c	Sat May 02 22:59:55 2015 +0800
+++ b/svr-session.c	Sun May 03 00:00:35 2015 +0800
@@ -138,6 +138,8 @@
 
 	/* exchange identification, version etc */
 	send_session_identification();
+	
+	kexfirstinitialise(); /* initialise the kex state */
 
 	/* start off with key exchange */
 	send_msg_kexinit();