On Thu, 28 May 1998, Pete Ryland wrote:

> On Thu, 28 May 1998, Glynn Clements wrote:
> >... 
> > According to Stevens, some BSD derived sytems implement a timeout on
> > the FIN_WAIT_2 state. I would suspect that Linux does (although I
> > don't know), as I've never encountered an accumulation of sockets in
> > the FIN_WAIT_2 state.
> 
> Hmm.. this would explain why a "netstat -t" always has a heap of things in
> that state.  I just assumed it was part of some protocol that only needed
> one-way communication or something.  Just checked now, and there's nothing
> in that state now, so there must be *some* timeout in linux.
> 
> Pete
> 

Look at /usr/src/linux/net/ipv4/tcp.c:

        /*
         *      This is a (useful) BSD violating of the RFC. There is a
         *      problem with TCP as specified in that the other end could
         *      keep a socket open forever with no application left this end.
         *      We use a 3 minute timeout (about the same as BSD) then kill
         *      our end. If they send after that then tough - BUT: long enough
         *      that we won't make the old 4*rto = almost no time - whoops
         *      reset mistake.
         */
        if(dead && ns==TCP_FIN_WAIT2)
        {
                int timer_active=del_timer(&sk->timer);
                if(timer_active)
                        add_timer(&sk->timer);
                else
                        tcp_reset_msl_timer(sk, TIME_CLOSE, TCP_FIN_TIMEOUT);
        }



------------------------------------------------------------------------------
        Best wishes,
                Marcel - Titus MARGINEAN
                [EMAIL PROTECTED], [EMAIL PROTECTED]

Reply via email to