From owner-freebsd-net@FreeBSD.ORG Thu Nov 14 13:51:19 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A041ACD for ; Thu, 14 Nov 2013 13:51:19 +0000 (UTC) Received: from corp1.jumptxt.com (corp1.jumptxt.com [66.207.219.236]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE4072C9F for ; Thu, 14 Nov 2013 13:51:18 +0000 (UTC) Received: from owa.impactmobile.com (office-tor.impactmobile.com [72.15.57.66]) (authenticated bits=0) by corp1.jumptxt.com (8.13.8/8.13.8) with ESMTP id rAEDZDtN025858 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK) for ; Thu, 14 Nov 2013 08:35:13 -0500 Received: from EXCHANGE1-TOR.impactmobile.local ([::1]) by exchange1-tor.impactmobile.local ([::1]) with mapi id 14.01.0218.012; Thu, 14 Nov 2013 08:35:13 -0500 From: Andrew Schmidt To: "freebsd-net@freebsd.org" Subject: Question regarding RST packet and the tcp stack Thread-Topic: Question regarding RST packet and the tcp stack Thread-Index: Ac7hPNQspl1jJCzLQD+WjmXpa5CX7A== Date: Thu, 14 Nov 2013 13:35:12 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.25.1.143] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.16 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 13:51:19 -0000 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.ni= o) An application (host) has established a remote connection to another machin= e. The OS on the host receives the following packets in order for that so= cket: Data packet (6 bytes) FIN packet RST packet At this point the application (host) tries to read from the socket. On w= indows, this causes a "the os has closed the connection" exception and doe= sn'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 arri= ves. Does anyone know what the correct behaviour is? Or point me to freebsd's t= cp stack code? Thanks,