[lkml]   [1998]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.1.98: mm++ SYN_SENT--
   Date: Mon, 27 Apr 1998 14:07:00 +0200
From: Thomas Quinot <thomas@Cuivre.FR.EU.ORG>

It looks to me like the 3rd packet (from the remote host, should have SYN, and so it is legitimate that we
reset the connection. but then, we should time out in inet_stream
connect if we cannot properly accomplish the TCP handshake.

Thanks for the clean analysis, the bug is clear now. We need to:

In tcp_input.c:tcp_rcv_state_process() first switch() statement, case
TCP_SYN_SENT, in all cases if th->ack set and we fail (and return 1
from this function) for some reason, we must do:

sk->err = ECONNRESET;

before returning 1 back (which will send the reset), this will wake up
the person sleeping in inet_stream_connect() and notice the 3 way
handshake failed.

Please test these suggested changes if you have a chance, it should
cure for good the SYN_SENT hangs people have been reporting.

Again, thanks again for the good bug reporting, I wish all were this
easy to fix ;-)

David S. Miller

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to

 \ /
  Last update: 2005-03-22 13:42    [from the cache]
©2003-2011 Jasper Spaans