From f134cb3d57f6286e6a3d2f5dcca7eb835c399813 Mon Sep 17 00:00:00 2001 From: Jon Simons Date: Mon, 4 May 2015 16:21:58 -0700 Subject: [PATCH] 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 Reviewed-by: Andreas Schneider --- src/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server.c b/src/server.c index 01145764..6a8a3fbe 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; }