summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-27 17:23:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-27 17:23:24 +0000
commit107b214250e4f79519ae27ac325c1b347cb3df8d (patch)
tree252e60f493720c2ca9dcd9c933f1afa02143afc5
parent336a74325b737793f3dcbbf25488657fbabcec2e (diff)
TCP_COMPAT_42 was last used in 1997. Kill it.
ok millert
-rw-r--r--share/man/man4/options.426
-rw-r--r--sys/conf/GENERIC3
-rw-r--r--sys/netinet/tcp_input.c7
-rw-r--r--sys/netinet/tcp_subr.c6
-rw-r--r--sys/netinet/tcp_timer.c17
-rw-r--r--sys/netinet/tcp_usrreq.c7
6 files changed, 7 insertions, 59 deletions
diff --git a/share/man/man4/options.4 b/share/man/man4/options.4
index 93387f9a9f2..d1a5ad65a43 100644
--- a/share/man/man4/options.4
+++ b/share/man/man4/options.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: options.4,v 1.185 2007/11/25 17:11:11 oga Exp $
+.\" $OpenBSD: options.4,v 1.186 2007/11/27 17:23:23 deraadt Exp $
.\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
.\"
.\" Copyright (c) 1998 Theo de Raadt
@@ -34,7 +34,7 @@
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
-.Dd $Mdocdate: November 25 2007 $
+.Dd $Mdocdate: November 27 2007 $
.Dt OPTIONS 4
.Os
.Sh NAME
@@ -697,28 +697,6 @@ Include kernel support for the AppleTalk family of protocols.
This suite of supporting code is sometimes called
.Em netatalk
support.
-.It Cd option TCP_COMPAT_42
-Use of this option is
-.Em extremely
-discouraged, so it should not be enabled.
-If any other machines on the network require enabling this, it's
-recommended that
-.Em they
-be disconnected from the network.
-.Pp
-TCP bug compatibility with
-.Bx 4.2 .
-In
-.Bx 4.2 ,
-TCP sequence numbers
-were 32-bit signed values.
-Modern implementations of TCP use unsigned values.
-This option clamps the initial sequence number to start in
-the range 2^31 rather than the full unsigned range of 2^32.
-Also, under
-.Bx 4.2 ,
-keepalive packets must contain at least one byte or else
-the remote end will not respond.
.It Cd option TCP_SACK
Turns on selective acknowledgements.
Additional information about
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC
index 9dc6a520fda..be7005304cc 100644
--- a/sys/conf/GENERIC
+++ b/sys/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.136 2007/11/25 16:14:10 marco Exp $
+# $OpenBSD: GENERIC,v 1.137 2007/11/27 17:23:23 deraadt Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
@@ -28,7 +28,6 @@ option UVM_SWAP_ENCRYPT# support encryption of pages going to swap
#option COMPAT_25 # 2.5,
#option COMPAT_35 # 3.5,
option COMPAT_43 # and 4.3BSD
-#option TCP_COMPAT_42 # TCP bug compatibility with 4.2BSD
option LKM # loadable kernel modules
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 23f8d91a857..89f59938c1c 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.209 2007/11/27 16:22:13 martynas Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.210 2007/11/27 17:23:23 deraadt Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -4069,12 +4069,7 @@ syn_cache_add(src, dst, th, iphlen, so, m, optp, optlen, oi, issp)
sc->sc_ipopts = ipopts;
sc->sc_irs = th->th_seq;
-#ifdef TCP_COMPAT_42
- tcp_iss += TCP_ISSINCR/2;
- sc->sc_iss = tcp_iss;
-#else
sc->sc_iss = issp ? *issp : arc4random();
-#endif
sc->sc_peermaxseg = oi->maxseg;
sc->sc_ourmaxseg = tcp_mss_adv(m->m_flags & M_PKTHDR ?
m->m_pkthdr.rcvif : NULL, sc->sc_src.sa.sa_family);
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index e5048bfb54a..66ac661607e 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.100 2007/09/18 22:02:18 djm Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.101 2007/11/27 17:23:23 deraadt Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -351,11 +351,7 @@ tcp_respond(tp, template, m, ack, seq, flags)
m = m_gethdr(M_DONTWAIT, MT_HEADER);
if (m == NULL)
return;
-#ifdef TCP_COMPAT_42
- tlen = 1;
-#else
tlen = 0;
-#endif
m->m_data += max_linkhdr;
switch (af) {
#ifdef INET6
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 1f9780ddc05..f313b4b1857 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.40 2007/09/01 18:49:28 henning Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.41 2007/11/27 17:23:23 deraadt Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -135,13 +135,7 @@ tcp_slowtimo()
s = splsoftnet();
tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl;
-#ifdef TCP_COMPAT_42
- tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
- if ((int)tcp_iss < 0)
- tcp_iss = 0; /* XXX */
-#else
tcp_iss += TCP_ISSINCR2/PR_SLOWHZ; /* increment iss */
-#endif /* TCP_COMPAT_42 */
tcp_now++; /* for timestamps */
splx(s);
}
@@ -458,17 +452,8 @@ tcp_timer_keep(void *arg)
* correspondent TCP to respond.
*/
tcpstat.tcps_keepprobe++;
-#ifdef TCP_COMPAT_42
- /*
- * The keepalive packet must have nonzero length
- * to get a 4.2 host to respond.
- */
- tcp_respond(tp, mtod(tp->t_template, caddr_t),
- (struct mbuf *)NULL, tp->rcv_nxt - 1, tp->snd_una - 1, 0);
-#else
tcp_respond(tp, mtod(tp->t_template, caddr_t),
(struct mbuf *)NULL, tp->rcv_nxt, tp->snd_una - 1, 0);
-#endif
TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepintvl);
} else
TCP_TIMER_ARM(tp, TCPT_KEEP, tcp_keepidle);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 749f82406e6..13dd15cbc67 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.93 2007/11/16 19:24:07 deraadt Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.94 2007/11/27 17:23:23 deraadt Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -333,12 +333,7 @@ tcp_usrreq(so, req, m, nam, control)
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
TCP_TIMER_ARM(tp, TCPT_KEEP, tcptv_keep_init);
-#ifdef TCP_COMPAT_42
- tp->iss = tcp_iss;
- tcp_iss += TCP_ISSINCR/2;
-#else /* TCP_COMPAT_42 */
tcp_set_iss_tsm(tp);
-#endif /* !TCP_COMPAT_42 */
tcp_sendseqinit(tp);
#if defined(TCP_SACK)
tp->snd_last = tp->snd_una;