summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2012-02-11 08:18:43 +1100
committerDamien Miller <djm@mindrot.org>2012-02-11 08:18:43 +1100
commit1de2cfe9a9304b00900aaa6ff9fe612e2ba51ba8 (patch)
tree2bc26f81af62c8aedef9b388c211214e129a4643 /packet.c
parent8d60be548778c025db8daa0345f8d77331086fc6 (diff)
- markus@cvs.openbsd.org 2012/01/25 19:26:43
[packet.c] do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying; ok dtucker@, djm@
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index 5e82fe753..0d29efffd 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.174 2011/12/07 05:44:38 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.175 2012/01/25 19:26:43 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -972,8 +972,10 @@ packet_send2(void)
972 972
973 /* during rekeying we can only send key exchange messages */ 973 /* during rekeying we can only send key exchange messages */
974 if (active_state->rekeying) { 974 if (active_state->rekeying) {
975 if (!((type >= SSH2_MSG_TRANSPORT_MIN) && 975 if ((type < SSH2_MSG_TRANSPORT_MIN) ||
976 (type <= SSH2_MSG_TRANSPORT_MAX))) { 976 (type > SSH2_MSG_TRANSPORT_MAX) ||
977 (type == SSH2_MSG_SERVICE_REQUEST) ||
978 (type == SSH2_MSG_SERVICE_ACCEPT)) {
977 debug("enqueue packet: %u", type); 979 debug("enqueue packet: %u", type);
978 p = xmalloc(sizeof(*p)); 980 p = xmalloc(sizeof(*p));
979 p->type = type; 981 p->type = type;