summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjesper <jesper@FreeBSD.org>2001-04-20 11:58:56 +0000
committerjesper <jesper@FreeBSD.org>2001-04-20 11:58:56 +0000
commita1fab55459954386c576d48706657c8cb4cb91d4 (patch)
treeb705e779553d97b6a52a0d9e59dc8e8ffce55857 /sys
parent96367160982bc210fed94ea4cde6d3ac00a343e8 (diff)
downloadFreeBSD-src-a1fab55459954386c576d48706657c8cb4cb91d4.zip
FreeBSD-src-a1fab55459954386c576d48706657c8cb4cb91d4.tar.gz
Say goodbye to TCP_COMPAT_42
Reviewed by: wollman Requested by: wollman
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/NOTES5
-rw-r--r--sys/conf/options1
-rw-r--r--sys/i386/conf/NOTES5
-rw-r--r--sys/netinet/tcp_input.c9
-rw-r--r--sys/netinet/tcp_reass.c9
-rw-r--r--sys/netinet/tcp_seq.h17
-rw-r--r--sys/netinet/tcp_subr.c7
-rw-r--r--sys/netinet/tcp_timer.c15
-rw-r--r--sys/netinet/tcp_timewait.c7
-rw-r--r--sys/netinet/tcp_usrreq.c9
10 files changed, 0 insertions, 84 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index c874a97..c0f6c5e 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -541,10 +541,6 @@ device stf #6to4 IPv6 over IPv4 encapsulation
#
# Internet family options:
#
-# TCP_COMPAT_42 causes the TCP code to emulate certain bugs present in
-# 4.2BSD. This option should not be used unless you have a 4.2BSD
-# machine and TCP connections fail.
-#
# MROUTING enables the kernel multicast packet forwarder, which works
# with mrouted(8).
#
@@ -576,7 +572,6 @@ device stf #6to4 IPv6 over IPv4 encapsulation
#
# TCPDEBUG is undocumented.
#
-options TCP_COMPAT_42 #emulate 4.2BSD TCP bugs
options MROUTING # Multicast routing
options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #print information about
diff --git a/sys/conf/options b/sys/conf/options
index cef90fd..9ed2314 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -284,7 +284,6 @@ PPP_BSDCOMP opt_ppp.h
PPP_DEFLATE opt_ppp.h
PPP_FILTER opt_ppp.h
SLIP_IFF_OPTS opt_slip.h
-TCP_COMPAT_42 opt_compat.h
TCPDEBUG
TCP_DROP_SYNFIN opt_tcp_input.h
XBONEHACK
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index c874a97..c0f6c5e 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -541,10 +541,6 @@ device stf #6to4 IPv6 over IPv4 encapsulation
#
# Internet family options:
#
-# TCP_COMPAT_42 causes the TCP code to emulate certain bugs present in
-# 4.2BSD. This option should not be used unless you have a 4.2BSD
-# machine and TCP connections fail.
-#
# MROUTING enables the kernel multicast packet forwarder, which works
# with mrouted(8).
#
@@ -576,7 +572,6 @@ device stf #6to4 IPv6 over IPv4 encapsulation
#
# TCPDEBUG is undocumented.
#
-options TCP_COMPAT_42 #emulate 4.2BSD TCP bugs
options MROUTING # Multicast routing
options IPFIREWALL #firewall
options IPFIREWALL_VERBOSE #print information about
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 036f675..934cd9a 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1111,12 +1111,7 @@ findpcb:
if (iss)
tp->iss = iss;
else {
-#ifdef TCP_COMPAT_42
- tcp_iss += TCP_ISSINCR/2;
- tp->iss = tcp_iss;
-#else
tp->iss = tcp_rndiss_next();
-#endif /* TCP_COMPAT_42 */
}
tp->irs = th->th_seq;
tcp_sendseqinit(tp);
@@ -1648,11 +1643,7 @@ trimthenstep6:
if (thflags & TH_SYN &&
tp->t_state == TCPS_TIME_WAIT &&
SEQ_GT(th->th_seq, tp->rcv_nxt)) {
-#ifdef TCP_COMPAT_42
- iss = tp->snd_nxt + TCP_ISSINCR;
-#else
iss = tcp_rndiss_next();
-#endif /* TCP_COMPAT_42 */
tp = tcp_close(tp);
goto findpcb;
}
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 036f675..934cd9a 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1111,12 +1111,7 @@ findpcb:
if (iss)
tp->iss = iss;
else {
-#ifdef TCP_COMPAT_42
- tcp_iss += TCP_ISSINCR/2;
- tp->iss = tcp_iss;
-#else
tp->iss = tcp_rndiss_next();
-#endif /* TCP_COMPAT_42 */
}
tp->irs = th->th_seq;
tcp_sendseqinit(tp);
@@ -1648,11 +1643,7 @@ trimthenstep6:
if (thflags & TH_SYN &&
tp->t_state == TCPS_TIME_WAIT &&
SEQ_GT(th->th_seq, tp->rcv_nxt)) {
-#ifdef TCP_COMPAT_42
- iss = tp->snd_nxt + TCP_ISSINCR;
-#else
iss = tcp_rndiss_next();
-#endif /* TCP_COMPAT_42 */
tp = tcp_close(tp);
goto findpcb;
}
diff --git a/sys/netinet/tcp_seq.h b/sys/netinet/tcp_seq.h
index 021f7aa..9d4adc8 100644
--- a/sys/netinet/tcp_seq.h
+++ b/sys/netinet/tcp_seq.h
@@ -81,23 +81,6 @@
#ifdef _KERNEL
extern tcp_cc tcp_ccgen; /* global connection count */
-#ifdef TCP_COMPAT_42
-/*
- * Increment for tcp_iss each second.
- * This is designed to increment at the standard 250 KB/s,
- * but with a random component averaging 128 KB.
- * We also increment tcp_iss by a quarter of this amount
- * each time we use the value for a new connection.
- * If defined, the tcp_random18() macro should produce a
- * number in the range [0-0x3ffff] that is hard to predict.
- */
-#ifndef tcp_random18
-#define tcp_random18() (arc4random() & 0x3ffff)
-#endif
-#define TCP_ISSINCR (122*1024 + tcp_random18())
-
-extern tcp_seq tcp_iss; /* tcp initial send seq # */
-#endif /* TCP_COMPAT_42 */
#else
#define TCP_ISSINCR (250*1024) /* increment for tcp_iss each second */
#endif /* _KERNEL */
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 64f4c06..4089551 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -182,9 +182,6 @@ tcp_init()
{
int hashsize;
-#ifdef TCP_COMPAT_42
- tcp_iss = 1; /* wrong */
-#endif /* TCP_COMPAT_42 */
tcp_ccgen = 1;
tcp_cleartaocache();
@@ -352,11 +349,7 @@ tcp_respond(tp, ipgen, th, 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;
#ifdef INET6
if (isipv6) {
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 2013c23..0a85cf8 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -132,11 +132,6 @@ tcp_slowtimo()
tcp_maxidle = tcp_keepcnt * tcp_keepintvl;
-#ifdef TCP_COMPAT_42
- tcp_iss += TCP_ISSINCR/PR_SLOWHZ; /* increment iss */
- if ((int)tcp_iss < 0)
- tcp_iss = TCP_ISSINCR; /* XXX */
-#endif
splx(s);
}
@@ -264,19 +259,9 @@ tcp_timer_keep(xtp)
* 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, tp->t_template->tt_ipgen,
- &tp->t_template->tt_t, (struct mbuf *)NULL,
- tp->rcv_nxt - 1, tp->snd_una - 1, 0);
-#else
tcp_respond(tp, tp->t_template->tt_ipgen,
&tp->t_template->tt_t, (struct mbuf *)NULL,
tp->rcv_nxt, tp->snd_una - 1, 0);
-#endif
callout_reset(tp->tt_keep, tcp_keepintvl, tcp_timer_keep, tp);
} else
callout_reset(tp->tt_keep, tcp_keepidle, tcp_timer_keep, tp);
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 64f4c06..4089551 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -182,9 +182,6 @@ tcp_init()
{
int hashsize;
-#ifdef TCP_COMPAT_42
- tcp_iss = 1; /* wrong */
-#endif /* TCP_COMPAT_42 */
tcp_ccgen = 1;
tcp_cleartaocache();
@@ -352,11 +349,7 @@ tcp_respond(tp, ipgen, th, 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;
#ifdef INET6
if (isipv6) {
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 07e1b90..25834d4 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -761,12 +761,7 @@ tcp_connect(tp, nam, p)
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
callout_reset(tp->tt_keep, tcp_keepinit, tcp_timer_keep, tp);
-#ifdef TCP_COMPAT_42
- tp->iss = tcp_iss;
- tcp_iss += TCP_ISSINCR/2;
-#else /* TCP_COMPAT_42 */
tp->iss = tcp_rndiss_next();
-#endif /* !TCP_COMPAT_42 */
tcp_sendseqinit(tp);
/*
@@ -858,11 +853,7 @@ tcp6_connect(tp, nam, p)
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
callout_reset(tp->tt_keep, tcp_keepinit, tcp_timer_keep, tp);
-#ifdef TCP_COMPAT_42
- tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
-#else
tp->iss = tcp_rndiss_next();
-#endif /* TCP_COMPAT_42 */
tcp_sendseqinit(tp);
/*
OpenPOWER on IntegriCloud