IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: data overflowing the window



der Mouse <mouse%Rodents.Montreal.QC.CA@localhost> writes:

> Suppose the connection is idle and B's receive window is 1000 bytes.
> 
> --> CHANNEL_DATA, 1500 bytes -->
> 
> A now thinks B's receive window is zero, with the last 500 bytes of
> data being possibly ignored.

Then A is not behaving properly, and he should be happy that B doesn't
just hangup on him. The spec allows B to operate in a sloppy mode and
just ignore the extra data and go on as if nothing happened, but
that's not supposed to be the normal way to operate.

Your own quoting of the spec says this fairly clearly: "The maximum
amount of data allowed is the current window size" Period. Sending
more should be considered a protocol violation.

Also note the final paragraph in section 3, "Channels are
flow-controlled. No data may be sent to a channel until a message is
received to indicate that window space is available."

(I think most implementations ignore the extra data and display a
warning message, but I wouldn't be surprised if some respond with a
SSH_MSG_DISCONNECT, SSH_DISCONNECT_PROTOCOL_ERROR, and some silently
accept the data. That's fine. However, any implementation that *sends*
more data than the current window size is broken. This is just an
example of the "be conservative in what you send, and liberal in what
you accept" attitude).

/Niels



Home | Main Index | Thread Index | Old Index