Bugzilla – Attachment 531 Details for
Bug 790
Connection stall when client output fails and server has a lot more to send
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
channels.c patch
channels.c.diff (text/plain), 1.17 KB, created by
Jeroen Ruigrok van der Werven
on 2004-01-16 19:56:20 AEDT
(
hide
)
Description:
channels.c patch
Filename:
MIME Type:
Creator:
Jeroen Ruigrok van der Werven
Created:
2004-01-16 19:56:20 AEDT
Size:
1.17 KB
patch
obsolete
>=================================================================== >RCS file: /cvs/src/crypto/openssh/channels.c,v >retrieving revision 1.3 >retrieving revision 1.4 >diff -u -p -r1.3 -r1.4 >--- src/crypto/openssh/channels.c 2003/09/17 02:01:05 1.3 >+++ src/crypto/openssh/channels.c 2004/01/15 12:03:00 1.4 >@@ -1711,12 +1711,23 @@ channel_input_data(int type, u_int32_t s > c->type != SSH_CHANNEL_X11_OPEN) > return; > >- /* same for protocol 1.5 if output end is no longer open */ >- if (!compat13 && c->ostate != CHAN_OUTPUT_OPEN) >- return; >- > /* Get the data. */ > data = packet_get_string(&data_len); >+ >+ /* >+ * same for protocol 1.5 if output end is no longer open. Note that >+ * the sending side is reducing its window as it sends data. We must >+ * 'fake' consumption of the data in order to ensure that window >+ * updates are sent back or a premature EPIPE on an ssh client output >+ * may while the server has a lot more data to send will deadlock >+ * the connection. >+ */ >+ if (!compat13 && c->ostate != CHAN_OUTPUT_OPEN) { >+ c->local_window -= data_len; >+ c->local_consumed += data_len; >+ xfree(data); >+ return; >+ } > > if (compat20) { > if (data_len > c->local_maxpacket) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 790
: 531