Hello,

I have another problem I'd like to solve.

I've seen a ESTABLIED socket which have no peer.
When a client attempt to connect to the server on linux,
linux may release a SYN_RECV connection silently and 
does not notiy to the client.


RFC916 says
        - A CLOSE request is made by the user.  Create a packet with
          FIN set.  Send it and go to the FIN-WAIT state.

I think sendig FIN is required when closing SYN_RECV connections
even if they are on a backlog-queue(sk->tp_pinfo.af_tcp.syn_wait_queue), 
but Linux releases SYN_RECV connections without anything.
Or it would not be bad idea to send reset (RST) to the peer
than doing nothing.


It should be like:

        tcp_close_pending()
        {
                for (each req on syn_wait_queue) {
                        if (status == SYN_ESTABLISHED) {
                                tcp_close();
                        } else { //SYN_RECV 
                                tcp_close_halfopen();
                        }
                }
        }

        tcp_syn_recv_timer() or tcp_synack_timer() 
        {
                        :
                if (retransmission is over) {
                        :
                        tcp_close_halfopen();
                        :
                } else {
                        :
                        send SYN+ACK;
                        :
                }
                        :
        }

        tcp_close_halfopen() 
        {
                send FIN and waiting for ACK+FIN, and lots of things to do.
                        or
                send RST
        }


How do you think about this problem?

Regards,
Hirokazu Takahashi
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to