# HG changeset patch # User Matt Johnston # Date 1430582435 -28800 # Node ID 8e02809867106b7b6b4e0208e2c954e60604be9b # Parent 3cb73e8d6122ba87c5afec34cbcf5bd6c079d7f5 Make sure kexfirstinitialise is called early enough diff -r 3cb73e8d6122 -r 8e0280986710 cli-session.c --- 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); diff -r 3cb73e8d6122 -r 8e0280986710 common-session.c --- 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; diff -r 3cb73e8d6122 -r 8e0280986710 svr-session.c --- 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();