From 1be9618f4ea9d8e5a0c9992e9b4ddb73b30b9957 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 11 Dec 2018 20:03:30 +0100 Subject: [PATCH] kex: Correctly check for the rekey (amends 83f2ac4a) This is more reliable fix than 83f2ac4a, which was failing for the server initialized rekeying, because the session_state is altered by receiving the KEXINIT from server. Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- src/kex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kex.c b/src/kex.c index 1101f876..7a1c89c7 100644 --- a/src/kex.c +++ b/src/kex.c @@ -745,7 +745,7 @@ int ssh_set_client_kex(ssh_session session) } /* For rekeying, skip the extension negotiation */ - if (session->session_state == SSH_SESSION_STATE_AUTHENTICATED) { + if (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) { return SSH_OK; }