From cf15944c2355f61116d7fb5e793c097dd347284f Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Tue, 26 Mar 2002 03:26:24 +0000 Subject: - markus@cvs.openbsd.org 2002/03/25 21:13:51 [channels.c channels.h compat.c compat.h nchan.c] don't send stderr data after EOF, accept this from older known (broken) sshd servers only, fixes http://bugzilla.mindrot.org/show_bug.cgi?id=179 --- channels.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'channels.h') diff --git a/channels.h b/channels.h index 707d9a925..0da2d4e5e 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.65 2002/03/04 17:27:39 stevesk Exp $ */ +/* $OpenBSD: channels.h,v 1.66 2002/03/25 21:13:51 markus Exp $ */ /* * Author: Tatu Ylonen @@ -135,6 +135,18 @@ struct Channel { #define CHAN_CLOSE_SENT 0x01 #define CHAN_CLOSE_RCVD 0x02 +#define CHAN_EOF_SENT 0x04 +#define CHAN_EOF_RCVD 0x08 + +/* check whether 'efd' is still in use */ +#define CHANNEL_EFD_INPUT_ACTIVE(c) \ + (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ + (c->efd != -1 || \ + buffer_len(&c->extended) > 0)) +#define CHANNEL_EFD_OUTPUT_ACTIVE(c) \ + (compat20 && c->extended_usage == CHAN_EXTENDED_WRITE && \ + ((c->efd != -1 && !(c->flags & CHAN_EOF_RCVD)) || \ + buffer_len(&c->extended) > 0)) /* channel management */ -- cgit v1.2.3