[e2e] Is this a bug with Windows TCP Stack ?

Joe Touch touch at ISI.EDU
Wed Dec 8 21:16:13 PST 2004



sanjay kaniyar wrote:
> RST is sent out because the application does not care about the connection
> anymore.

"not care" is not an error.

RST is supposed to go out only for a transport protocol error or an
application ABORT. Abort doesn't carry the 'I don't care' semantics;
it's deliberate blowing away of state, and should be used with caution, IMO.

> For instance, say an application sent data, issued a Shutdown() to
> close the connection gracefully - it waits for a duration of its choice but
> the disconnect does not complete and it wants to abort the connection. The
> Close() enables the application do exactly that.

Why does it need to abort the connection? If the disconnect doesn't
complete, the CLOSE should resend the FIN. If the FIN arrives and a RST
is sent in response, so be it, but that's what would happen - not the
other way around.

Besides, disconnect only means "I have nothing more to send" - closes 
are half-closes, not full, in TCP. If what you wanted was "close both 
ends", you are better off picking (or designing) another protocol, 
rather than abusing TCP.

Joe

> But, this instance may be completely unrelated - let's see what Gouthatm's
> test does.
> 
> Thanks,
> Sanjay
> 
> -----Original Message-----
> From: Joe Touch [mailto:touch at ISI.EDU] 
> Sent: Tuesday, December 07, 2004 8:05 AM
> To: sanjay kaniyar
> Cc: 'Ted Faber'; end2end-interest at postel.org
> Subject: Re: [e2e] Is this a bug with Windows TCP Stack ?
> 
> 
> 
> sanjay kaniyar wrote:
> 
>>Winsock API has subtle semantics, I am not totally sure but something like
>>this could result in the observed trace:
>>
>>- IIS does send
>>- does Shutdown(SD_SEND) -> data and FIN go out.
>>- setsockopt(Linger = OFF)
>>- closesocket		-> RST goes out.
> 
> 
> Why RST here? RST should be associated with an abort call. Closes that 
> don't involve errors should not cause RSTs.
> 
> The issue, IMO, is 'what is the _error_ here_'? Lingering state is not 
> an error.
> 
> Joe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://www.postel.org/pipermail/end2end-interest/attachments/20041208/1473ff38/signature.bin


More information about the end2end-interest mailing list