From c714b85e6095f78ac570bc302d770e64dcc6603b Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Tue, 10 Jan 2012 22:38:50 +0100 Subject: [PATCH] do not send service request/accept during rekeying --- ssh/packet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ssh/packet.c b/ssh/packet.c index bfaca69..cb32a5f 100644 --- a/ssh/packet.c +++ b/ssh/packet.c @@ -982,8 +982,10 @@ ssh_packet_send2(struct ssh *ssh) /* during rekeying we can only send key exchange messages */ if (state->rekeying) { - if (!((type >= SSH2_MSG_TRANSPORT_MIN) && - (type <= SSH2_MSG_TRANSPORT_MAX))) { + if ((type < SSH2_MSG_TRANSPORT_MIN) || + (type > SSH2_MSG_TRANSPORT_MAX) || + (type == SSH2_MSG_SERVICE_REQUEST) || + (type == SSH2_MSG_SERVICE_ACCEPT)) { debug("enqueue packet: %u", type); p = xmalloc(sizeof(*p)); p->type = type;