lkml.org 
[lkml]   [2000]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectmultiple TCP sockets with same (srcip,dstip,sport,dport)
Date
Hi,
Would the TCP gurus look at the following case and comment on it ?
(this is 2.2.13)

Its possible to create multiple sockets in the SYN_RECV state
all of which have the same 4-tuple.

Here is the scenario :
If a client machine sends out a SYN and the server sends a SYN-ACK
back and puts the new socket in SYN_RECV state. If the client machine
dies before it receives the SYN-ACK... the local port on the client can
be reused. If I start my client application again, it will reuse that port
and send another SYN with a different sequence number..

The problem is in the function tcp_check_req()... If you get a SYN
that hashes to the listening socket, we do check for retransmission
but we do not check for the fact that if it is not a retransmission, it
might still be from the same remote port as the remote port of
the half-open structure.

I am not sure what the spec has to say in this case (probably nothing)
But we could easily toss away the old half-open req (since we
are sure that the remote end doesnt have any state about it anyway)
and accept the new SYN..(there is still the problem that the old
SYN-ACK might be hanging out somewhere and could cause
this new connection to be RESET)

I am not sure how other UNIX variants deal with this problem.

Thanks
Rajeev



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.029 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site