Still confused about window adjustments

JCA 1.41421 at
Sat Jul 28 20:13:08 EST 2007

  Let's say, for concreteness, that I have a box A running an OpenSSH
client, and a box B running an SSH server, which may or may not be

  Looking in the OpenSSH code, I got the impression (this may be
wrong; please let me know if it is) that on receiving a packet that
consumes window space, A would check out whether or not its current
window has to be adjusted. If it does then it immediately sends a
window adjust packet to B.

  Now what happens if B has sent, say, three packets (1, 2 and 3) that
consume window space space in the same network frame? B may have
constructed the packets in such a way that they consume all the window
space available at the time. However, if A examines 1 and determines
that it needs to send a window adjust packet immediately (which may
well happen) before examining 2 and 3, would it not be the case that,
from that point onwards, A and B will have a different idea of the
current window size?

  I am assuming that, when sending a window adjust packet, A changes
the value of its internal window size counter correspondingly. If that
is the case, when processing packets 2 and 3 A will be using a
different measure of the window size than that used by B when it
constructed them - which might well lead to a en eventual deadlock in
the conversation between A and B.

  Is there anything to this, or am I totally off the mark here?
Feedback from OpenSSH developers would be much appreciated.

More information about the openssh-unix-dev mailing list