On Thu, 17 Apr 2008 15:29:42 EDT erik quanstrom <[EMAIL PROTECTED]> wrote:
> > On Thu, 17 Apr 2008 09:18:31 BST Charles Forsyth <[EMAIL PROTECTED]> w
> rote:
> >> > having said that, i now suspect that sending one byte into a zero-window
> is
> >> not the problem.
> >>
> >> because the one-byte probe can only be done if there is data to send, and
> i
> >> already knew that a plain connection (dial only) to that port also failed:
> >
> > Not setting the PSH bit on a pure ACK (== no data is being
> > sent) seems to fix this (see ip/tcp.c around line 2530). May
> > be it tickles a bug on the receiver (0 byte read?).
>
> this does work for me. is there some subtile reason *to* set the psh bit
> on a pure ack? in certain circumstances?
While I wouldn't call it "wrong" it seems silly to set the
PSH bit when no data is being sent. See rfc1122 section
4.2.2.2. Among other things it says:
At the receiver, the PSH bit forces buffered data to be
delivered to the application (even if less than a full
buffer has been received).
Because of this what is likely happening is that on receiving
the PSH bit read() completes and returns to the caller app
with a count = 0 which the app must think indicates EOF!
May be this behavior in plan9 is due to a misplaced right
brace? Move the closing brace on line 2530 to below the PSH
bit logic and all is fine.