summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorolah <olah@FreeBSD.org>1996-01-17 09:35:23 +0000
committerolah <olah@FreeBSD.org>1996-01-17 09:35:23 +0000
commit93bd3a261b2e54b8e220ab63733f6545f722ff70 (patch)
tree042d8cd7a0648093873b56c1930c9f51be862c52 /sys/netinet/tcp_output.c
parent974b8206400473ae0b933424043fb3df0889a542 (diff)
downloadFreeBSD-src-93bd3a261b2e54b8e220ab63733f6545f722ff70.zip
FreeBSD-src-93bd3a261b2e54b8e220ab63733f6545f722ff70.tar.gz
Be more conservative when T/TCP extensions are disabled. In particular,
do not send data and/or FIN on SYN segments in this case.
Diffstat (limited to 'sys/netinet/tcp_output.c')
-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 52dd4df..c080b05 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_output.c 8.4 (Berkeley) 5/24/95
- * $Id: tcp_output.c,v 1.16 1995/11/03 22:08:08 olah Exp $
+ * $Id: tcp_output.c,v 1.17 1995/12/05 17:46:35 wollman 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,
OpenPOWER on IntegriCloud