Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 2004 23:39:56 -0800
From:      "Crist J. Clark" <cristjc@comcast.net>
To:        Zherdev Anatoly <tolyar@mx.ru>
Cc:        cristjc@comcast.net
Subject:   Re: Problem with closing tcp session between cisco and freebsd
Message-ID:  <20040317073956.GA52536@blossom.cjclark.org>
In-Reply-To: <20040317101453.5fcdaa82@dwarf.demos.su>
References:  <20040316125335.5f64cac5@dwarf.demos.su> <20040317000611.GA51156@blossom.cjclark.org> <20040317101453.5fcdaa82@dwarf.demos.su>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 17, 2004 at 10:14:53AM +0300, Zherdev Anatoly wrote:
> On Tue, 16 Mar 2004 16:06:11 -0800
> "Crist J. Clark" <cristjc@comcast.net> wrote:
> 
> 
> [Skip...]
>                                                                   ^
> > The zero window-size tells me the TCP buffer on the FreeBSD side is
> > full. The Cisco is trying to send that last byte of data and the FIN,
> > but the FreeBSD side cannot accept it since the buffer is full. This
> > usually means the application on the FreeBSD side is not reading the
> > data out of the socket.
> > 
> > What's the 'netstat -an' for this connection on the FreeBSD side?
> 
> There is netstat -an for this session
> 
> tcp4   57352      0  FREEBSD.513        CISCO.990       ESTABLISHED
         ^^^^^
This is the Recv-Q. That value wouldn't happen to coincide with
the value of,

  $ sysctl net.inet.tcp.recvspace

But it looks like my guess is probably correct. The receive buffer at
the FreeBSD end is full. When it receives more TCP data, it cannot
accept it so it ACKs up to whatever it has in the buffer and not what
the sender sent in the last segment. It also sends a window size of
zero to tell the sender it's not accepting more data at the moment.

You need to flush the buffer at the FreeBSD end. The program receiving
on that socket needs to read the data. If the process is frozen, kill
it and things should clear up.
-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040317073956.GA52536>