From 4b6eb05023f415c3c3097a69066c7f2a326d173f Mon Sep 17 00:00:00 2001 From: Tilo Eckert Date: Tue, 13 Nov 2018 12:21:53 +0100 Subject: 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 Reviewed-by: Andreas Schneider --- src/packet_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/packet_cb.c b/src/packet_cb.c index dc883244..af5b966c 100644 --- a/src/packet_cb.c +++ b/src/packet_cb.c @@ -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; } } -- cgit v1.2.3