do not send service request/accept during rekeying

This commit is contained in:
Markus Friedl
2012-01-10 22:38:50 +01:00
parent 9f176fa427
commit c714b85e60

View File

@@ -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;