Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2013 13:35:12 +0000
From:      Andrew Schmidt <Andrew.Schmidt@impactmobile.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Question regarding RST packet and the tcp stack
Message-ID:  <AB6DCFC5655620408374E392D11AB44E10ED55FA@exchange1-tor.impactmobile.local>

next in thread | raw e-mail | index | archive | help

I've been testing out a scenario on windows and linux and I have a question for what FreeBSD does or rfc1122 says:  (The code is in java using java.nio)

An application (host) has established a remote connection to another machine.   The OS on the host receives the following packets in order for that socket:

Data packet (6 bytes)
FIN packet
RST packet

At this point the application (host) tries to read from the socket.    On windows,  this causes a "the os has closed the connection" exception and doesn't let you read those 6 bytes.

On Linux, those 6 bytes can be read.

I've looked over the TCP rfc:  http://www.rfc-editor.org/rfc/rfc1122.txt    .  But it's not clear what should happen to 6 bytes once a RST packet arrives.

Does anyone know what the correct behaviour is?  Or point me to freebsd's tcp stack code?

Thanks,



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