Blame SOURCES/s390x_fix.patch

de596f
diff --git a/src/packet.c b/src/packet.c
de596f
index ec4a7203..a81eb8e3 100644
de596f
--- a/src/packet.c
de596f
+++ b/src/packet.c
de596f
@@ -1752,10 +1752,12 @@ static bool
de596f
 ssh_packet_in_rekey(ssh_session session)
de596f
 {
de596f
     /* We know we are rekeying if we are authenticated and the DH
de596f
-     * status is not finished
de596f
+     * status is not finished, but we only queue packets until we've
de596f
+     * sent our NEWKEYS.
de596f
      */
de596f
     return (session->flags & SSH_SESSION_FLAG_AUTHENTICATED) &&
de596f
-           (session->dh_handshake_state != DH_STATE_FINISHED);
de596f
+           (session->dh_handshake_state != DH_STATE_FINISHED) &&
de596f
+           (session->dh_handshake_state != DH_STATE_NEWKEYS_SENT);
de596f
 }
de596f
 
de596f
 int ssh_packet_send(ssh_session session)