1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

packet: Fix timeout on hostkey type mismatch instead of proper error

If the hostkey type was not in the list of acceptable hostkey
types, the function failed to set the error state. Due to the
fact that the calling function ssh_packet_process() does not
handle the SSH_ERROR return code, the newkeys packet from the
server was silently ignored, stalling the connection until a
timeout occurred.

Signed-off-by: Tilo Eckert <tilo.eckert@flam.de>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Tilo Eckert
2018-11-13 12:21:53 +01:00
committed by Andreas Schneider
parent 59ada799d7
commit 4b6eb05023

View File

@@ -198,7 +198,7 @@ SSH_PACKET_CALLBACK(ssh_packet_newkeys){
"preference (%s)",
server_key->type_c,
session->opts.wanted_methods[SSH_HOSTKEYS]);
return -1;
goto error;
}
}