multiple TCP sockets with same (srcip,dstip,sport,dport)

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

 



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


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux