Blame SOURCES/s390x_fix.patch

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