aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1996-01-31 11:09:44 +0000
committerDavid Greenman <dg@FreeBSD.org>1996-01-31 11:09:44 +0000
commit84d501b6a928ed98d844f668ec53cfb51ed8fec8 (patch)
treea591a3c5b13ec3793aa09776781cf397f343f19b
parent9e5479e60f899bffe180cc7ccf1bc627cc967489 (diff)
Notes
-rw-r--r--sys/netinet/tcp_output.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index cfed3d2fb26f..620a58f72183 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_output.c 8.3 (Berkeley) 12/30/93
- * $Id: tcp_output.c,v 1.11.4.1 1995/09/15 08:58:07 davidg Exp $
+ * $Id: tcp_output.c,v 1.11.4.2 1996/01/31 11:02:00 davidg Exp $
*/
#include <sys/param.h>
@@ -167,6 +167,19 @@ again:
return 0;
}
+ /*
+ * Be careful not to send data and/or FIN on SYN segments
+ * in cases when no CC option will be sent.
+ * This measure is needed to prevent interoperability problems
+ * with not fully conformant TCP implementations.
+ */
+ if ((flags & TH_SYN) &&
+ ((tp->t_flags & TF_NOOPT) || !(tp->t_flags & TF_REQ_CC) ||
+ ((flags & TH_ACK) && !(tp->t_flags & TF_RCVD_CC)))) {
+ len = 0;
+ flags &= ~TH_FIN;
+ }
+
if (len < 0) {
/*
* If FIN has been sent but not acked,