From bc27d4e987caa3a9d9bb965883f6f551317ddf02 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 13 Feb 2002 13:54:06 +1100 Subject: - markus@cvs.openbsd.org 2002/02/11 16:10:15 [kex.c] restore kexinit handler if we reset the dispatcher, this unbreaks rekeying s/kex_clear_dispatch/kex_reset_dispatch/ --- kex.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kex.c') diff --git a/kex.c b/kex.c index b58b12f4..02c9780a 100644 --- a/kex.c +++ b/kex.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.43 2002/01/25 22:07:40 markus Exp $"); +RCSID("$OpenBSD: kex.c,v 1.44 2002/02/11 16:10:15 markus Exp $"); #include @@ -113,16 +113,17 @@ kex_protocol_error(int type, u_int32_t seq, void *ctxt) } static void -kex_clear_dispatch(void) +kex_reset_dispatch(void) { dispatch_range(SSH2_MSG_TRANSPORT_MIN, SSH2_MSG_TRANSPORT_MAX, &kex_protocol_error); + dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); } void kex_finish(Kex *kex) { - kex_clear_dispatch(); + kex_reset_dispatch(); packet_start(SSH2_MSG_NEWKEYS); packet_send(); @@ -200,8 +201,7 @@ kex_setup(char *proposal[PROPOSAL_MAX]) kex->done = 0; kex_send_kexinit(kex); /* we start */ - kex_clear_dispatch(); - dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); + kex_reset_dispatch(); return kex; } -- cgit v1.2.3