summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2008-02-24 05:13:20 +0000
committersilby <silby@FreeBSD.org>2008-02-24 05:13:20 +0000
commit5083324c2aa77d3d48dbf42837d9d200f1df9e2b (patch)
treec017acdeccf2d6e97b6a6ab0f1055a9896541df9 /sys/netinet/tcp_var.h
parentded28f747fe3402c76a5189a35952363c1cb714e (diff)
downloadFreeBSD-src-5083324c2aa77d3d48dbf42837d9d200f1df9e2b.zip
FreeBSD-src-5083324c2aa77d3d48dbf42837d9d200f1df9e2b.tar.gz
Change FreeBSD 7 so that it returns TCP options in
the same order that FreeBSD 6 and before did. Doug White and the other bloodhounds at ISC discovered that while FreeBSD 7's ordering of options was more efficient, it caused some cable modem routers to ignore the SYN-ACKs ordered in this fashion. The placement of sackOK after the timestamp option seems to be the critical difference: FreeBSD 6: <mss 1460,nop,wscale 1,nop,nop,timestamp 3512155768 0,sackOK,eol> FreeBSD 7.0: <mss 1460,nop,wscale 3,sackOK,timestamp 1370692577 0> FreeBSD 7.0 + this change: <mss 1460,nop,wscale 3,nop,nop,timestamp 7371813 0,sackOK,eol> MFC after: 1 week
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index afb0150..3f18842 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -238,14 +238,17 @@ struct tcpcb {
* to tcp_dooptions and tcp_addoptions.
* The binary order of the to_flags is relevant for packing of the
* options in tcp_addoptions.
+ * SACK should be kept after TS; some broken cable modem / router
+ * devices were found in the field that ignore SYN-ACKs with
+ * SACK before TS.
*/
struct tcpopt {
u_long to_flags; /* which options are present */
#define TOF_MSS 0x0001 /* maximum segment size */
#define TOF_SCALE 0x0002 /* window scaling */
-#define TOF_SACKPERM 0x0004 /* SACK permitted */
#define TOF_TS 0x0010 /* timestamp */
-#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */
+#define TOF_SIGNATURE 0x0020 /* TCP-MD5 signature option (RFC2385) */
+#define TOF_SACKPERM 0x0040 /* SACK permitted */
#define TOF_SACK 0x0080 /* Peer sent SACK option */
#define TOF_MAXOPT 0x0100
u_int32_t to_tsval; /* new timestamp */
OpenPOWER on IntegriCloud