Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2016 08:15:02 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r308745 - in head/sys/netinet: . tcp_stacks
Message-ID:  <201611170815.uAH8F2D2005936@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Nov 17 08:15:02 2016
New Revision: 308745
URL: https://svnweb.freebsd.org/changeset/base/308745

Log:
  Notify the use via setting errno when a TCP RST segment is received
  either in the CLOSING or LAST-ACK state.
  
  Reviewed by:		hiren
  MFC after:		3 weeks
  Sponsored by:		Netflix
  Differential Revision:	https://reviews.freebsd.org/D8371

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_stacks/fastpath.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Thu Nov 17 07:33:37 2016	(r308744)
+++ head/sys/netinet/tcp_input.c	Thu Nov 17 08:15:02 2016	(r308745)
@@ -2202,6 +2202,8 @@ tcp_do_segment(struct mbuf *m, struct tc
 				case TCPS_FIN_WAIT_1:
 				case TCPS_FIN_WAIT_2:
 				case TCPS_CLOSE_WAIT:
+				case TCPS_CLOSING:
+				case TCPS_LAST_ACK:
 					so->so_error = ECONNRESET;
 				close:
 					tcp_state_change(tp, TCPS_CLOSED);

Modified: head/sys/netinet/tcp_stacks/fastpath.c
==============================================================================
--- head/sys/netinet/tcp_stacks/fastpath.c	Thu Nov 17 07:33:37 2016	(r308744)
+++ head/sys/netinet/tcp_stacks/fastpath.c	Thu Nov 17 08:15:02 2016	(r308745)
@@ -746,6 +746,8 @@ tcp_do_slowpath(struct mbuf *m, struct t
 				case TCPS_FIN_WAIT_1:
 				case TCPS_FIN_WAIT_2:
 				case TCPS_CLOSE_WAIT:
+				case TCPS_CLOSING:
+				case TCPS_LAST_ACK:
 					so->so_error = ECONNRESET;
 				close:
 					tcp_state_change(tp, TCPS_CLOSED);



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