summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2006-01-30 12:22:22 +0000
committerreyk <reyk@openbsd.org>2006-01-30 12:22:22 +0000
commitdcae7b47cc95e954776495769cf3020b2adb1f85 (patch)
tree25c2a89b6bdf94dabe55ac07a054bcb011545cb7 /usr.bin/ssh/channels.c
parentupdate for new ftp-proxy (diff)
downloadwireguard-openbsd-dcae7b47cc95e954776495769cf3020b2adb1f85.tar.xz
wireguard-openbsd-dcae7b47cc95e954776495769cf3020b2adb1f85.zip
mark channel as write failed or dead instead of read failed on error
of the channel output filter. ok markus@
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 778ddec23e7..b7e185633ab 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.231 2005/12/30 15:56:36 reyk Exp $");
+RCSID("$OpenBSD: channels.c,v 1.232 2006/01/30 12:22:22 reyk Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1465,7 +1465,11 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset)
if (c->output_filter != NULL) {
if ((buf = c->output_filter(c, &data, &dlen)) == NULL) {
debug2("channel %d: filter stops", c->self);
- chan_read_failed(c);
+ if (c->type != SSH_CHANNEL_OPEN)
+ chan_mark_dead(c);
+ else
+ chan_write_failed(c);
+ return -1;
}
} else if (c->datagram) {
buf = data = buffer_get_string(&c->output, &dlen);