Applied fix from Andreas Schulz with a different comment by me. Fixes a

bug where TCP connections are closed prematurely.

Submitted by:	Andreas Schulz
This commit is contained in:
David Greenman 1995-01-23 17:58:27 +00:00
parent 3ec66d6c39
commit 297a37f334
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5802

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_output.c 8.3 (Berkeley) 12/30/93
* $Id: tcp_output.c,v 1.2 1994/08/02 07:49:03 davidg Exp $
* $Id: tcp_output.c,v 1.3 1994/09/15 10:36:55 davidg Exp $
*/
#include <sys/param.h>
@ -322,6 +322,11 @@ send:
* bump the packet length beyond the t_maxseg length.
*/
if (len > tp->t_maxseg - optlen) {
/*
* If there is still more to send, don't close the connection.
*/
flags &= ~TH_FIN;
len = tp->t_maxseg - optlen;
sendalot = 1;
}