[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] server: return SSH_OK for ignored SSH_MSG_KEXDH_INIT case



From 9ce92b5dd10f87d6b3a920a175f5211ff8b2656e Mon Sep 17 00:00:00 2001
From: Jon Simons <jon@xxxxxxxxxxxxx>
Date: Mon, 4 May 2015 16:21:58 -0700
Subject: [PATCH 1/2] server: return SSH_OK for ignored SSH_MSG_KEXDH_INIT case

Return SSH_OK for the case that an incoming SSH_MSG_KEXDH_INIT should be
ignored.  That is, for the case that the initial 'first_kex_packet_follows'
guess is incorrect.  Before this change sessions served with libssh can be
observed to error out unexpectedly early when testing with dropbear clients
that send an incompatible guess.

Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx>
---
 src/server.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/server.c b/src/server.c
index 0114576..6a8a3fb 100644
--- a/src/server.c
+++ b/src/server.c
@@ -187,6 +187,7 @@ SSH_PACKET_CALLBACK(ssh_packet_kexdh_init){
     SSH_LOG(SSH_LOG_RARE, "first_kex_packet_follows guess was wrong, "
                           "ignoring first SSH_MSG_KEXDH_INIT message");
     session->first_kex_follows_guess_wrong = 0;
+    rc = SSH_OK;
     goto error;
   }
 
-- 
1.9.1


Archive administrator: postmaster@lists.cynapses.org