tech-net archive

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

Re: BSD doesn't track window size changes correctly.



    Date:        Sun, 01 Apr 2012 18:13:36 +1000
    From:        Darren Reed <darrenr%NetBSD.org@localhost>
    Message-ID:  <4F780E30.3000204%netbsd.org@localhost>

  | ... the problem here is that it only recognises window updates
  | that increase the window size.

That's not quite what the code says, in one of the three alternatives
the window is only allowed to grow, but ...

  | Thus if the remote end sends back
  | a packet that indicates the window size is 0, it is ignored.

In that case, yes, but that's also very poor behaviour from the peer,
and not something it can rely upon working (while I'd agree that
perhaps strictly it should).

That is, if the peer has previously authorised our sending some data,
and later tries to take it back, it cannot assume that we had not already
sent the data up to the advertised window size, nor can it assume (in
the case that matters) that we ever even saw its attempted window update
(if I read that right, that third alternative should normally only occur
for a packet with the same seq & ack as previously received, so there's no
way any reply we send can distinguish receiving that packet from receiving
the previous one - unless perhaps it had more data than the earlier packet,
but that would be a very unusual implementation.)

That is, a peer that acts like this cannot complain if we keep sending data
to the old authorised window, and even if we keep retransmitting it if there's
no ack.

If I were you I'd concentrate on finding out what wacky system is closing
the window after previously opening it, that's anti-social TCP at best.

kre



Home | Main Index | Thread Index | Old Index