aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2015-05-04 16:21:58 -0700
committerAndreas Schneider <asn@cryptomilk.org>2015-05-05 22:03:32 +0200
commitf134cb3d57f6286e6a3d2f5dcca7eb835c399813 (patch)
tree9c02a7b3651105c7814c9dad85e9a0770e7f6b50
parent3eaad77de2a9c751e56424f3c34afec943beb647 (diff)
downloadlibssh-f134cb3d57f6286e6a3d2f5dcca7eb835c399813.tar.gz
libssh-f134cb3d57f6286e6a3d2f5dcca7eb835c399813.tar.xz
libssh-f134cb3d57f6286e6a3d2f5dcca7eb835c399813.zip
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@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/server.c1
1 files changed, 1 insertions, 0 deletions
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;
}