OpenSSH 2.4.0 patch call..

Markus Friedl markus.friedl at informatik.uni-erlangen.de
Sat Dec 30 23:49:34 EST 2000


i don't understand your change. have you looked at nchan2.ms?
why should we stop reading from a socket if we no longer write
to the very same socket?

-markus

On Fri, Dec 29, 2000 at 11:39:51PM -0600, mouring at etoh.eviladmin.org wrote:
> I know this does not solve Protocol 1 hanging, but can you give me a
> reason why the following patch won't work for Protocol 2 to hang the
> 'sleep 30&exit' issue.  It tells OpenSSH to explicitly drain the input
> buffers if the output buffers are closed.  (Of course the same trick does
> not work under protocol 1 ecause channel_write_fail1() is not called soon
> enough.)
> 
> - Ben
> 
> --- ../openssh/nchan.c	Mon Nov 13 05:57:26 2000
> +++ nchan.c	Fri Dec 29 23:19:40 2000
> @@ -335,11 +335,13 @@
>  	case CHAN_OUTPUT_OPEN:
>  		debug("channel %d: output open -> closed", c->self);
>  		chan_shutdown_write(c); /* ?? */
> +		c->istate = CHAN_INPUT_WAIT_DRAIN;
>  		c->ostate = CHAN_OUTPUT_CLOSED;
>  		break;
>  	case CHAN_OUTPUT_WAIT_DRAIN:
>  		debug("channel %d: output drain -> closed", c->self);
>  		chan_shutdown_write(c);
> +		c->istate = CHAN_INPUT_WAIT_DRAIN;
>  		c->ostate = CHAN_OUTPUT_CLOSED;
>  		break;
>  	default:
> 





More information about the openssh-unix-dev mailing list