svn commit: r310211 - in stable/11/sys/netinet: . tcp_stacks

Michael Tuexen tuexen at FreeBSD.org
Sun Dec 18 12:20:23 UTC 2016


Author: tuexen
Date: Sun Dec 18 12:20:22 2016
New Revision: 310211
URL: https://svnweb.freebsd.org/changeset/base/310211

Log:
  MFC r308745:
  
  Notify the user via setting errno when a TCP RST segment is received
  either in the CLOSING or LAST-ACK state.
  
  Sponsored by:	Netflix, Inc.

Modified:
  stable/11/sys/netinet/tcp_input.c
  stable/11/sys/netinet/tcp_stacks/fastpath.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_input.c
==============================================================================
--- stable/11/sys/netinet/tcp_input.c	Sun Dec 18 12:16:47 2016	(r310210)
+++ stable/11/sys/netinet/tcp_input.c	Sun Dec 18 12:20:22 2016	(r310211)
@@ -2185,6 +2185,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: stable/11/sys/netinet/tcp_stacks/fastpath.c
==============================================================================
--- stable/11/sys/netinet/tcp_stacks/fastpath.c	Sun Dec 18 12:16:47 2016	(r310210)
+++ stable/11/sys/netinet/tcp_stacks/fastpath.c	Sun Dec 18 12:20:22 2016	(r310211)
@@ -734,6 +734,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);


More information about the svn-src-all mailing list