Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/packet.c,v rcsdiff: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/packet.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -p -r1.8 -r1.8.2.1 --- src/crypto/external/bsd/openssh/dist/packet.c 2011/09/07 17:49:19 1.8 +++ src/crypto/external/bsd/openssh/dist/packet.c 2012/05/23 10:07:05 1.8.2.1 @@ -1,5 +1,5 @@ -/* $NetBSD: packet.c,v 1.8 2011/09/07 17:49:19 christos Exp $ */ -/* $OpenBSD: packet.c,v 1.173 2011/05/06 21:14:05 djm Exp $ */ +/* $NetBSD: packet.c,v 1.8.2.1 2012/05/23 10:07:05 yamt Exp $ */ +/* $OpenBSD: packet.c,v 1.176 2012/01/25 19:40:09 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,7 +39,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: packet.c,v 1.8 2011/09/07 17:49:19 christos Exp $"); +__RCSID("$NetBSD: packet.c,v 1.8.2.1 2012/05/23 10:07:05 yamt Exp $"); #include #include #include @@ -241,7 +241,7 @@ packet_set_connection(int fd_in, int fd_ void packet_set_timeout(int timeout, int count) { - if (timeout == 0 || count == 0) { + if (timeout <= 0 || count <= 0) { active_state->packet_timeout_ms = -1; return; } @@ -964,8 +964,10 @@ packet_send2(void) /* during rekeying we can only send key exchange messages */ if (active_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; @@ -1444,12 +1446,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_ } } -int -packet_read_poll(void) -{ - return packet_read_poll_seqnr(NULL); -} - /* * Buffers the given amount of input characters. This is intended to be used * together with packet_read_poll.