diff common-channel.c @ 495:cd02449b709c

Don't send anything in response to a SSH_MSG_CHANNEL_REQUEST if we have already sent a SSH_MSG_CHANNEL_CLOSE. This fixes a bug triggered by more recent versions of putty with tcp fowarding and window adjustment request messages.
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 Sep 2008 12:03:01 +0000
parents 0871a0b89f7c
children 950c38b854a1
line wrap: on
line diff
--- a/common-channel.c	Mon Sep 22 15:47:35 2008 +0000
+++ b/common-channel.c	Tue Sep 23 12:03:01 2008 +0000
@@ -572,6 +572,11 @@
 	
 	channel = getchannel();
 
+	if (channel->sent_close) {
+		TRACE(("leave recv_msg_channel_request: already closed channel"))
+		return;
+	}
+
 	if (channel->type->reqhandler) {
 		channel->type->reqhandler(channel);
 	} else {