Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Remove TCP_COMPAT_42. This feature is a workarou...
details: https://anonhg.NetBSD.org/src/rev/8681d65b603f
branches: trunk
changeset: 355420:8681d65b603f
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Jul 28 19:16:41 2017 +0000
description:
Remove TCP_COMPAT_42. This feature is a workaround for a bug in the TCP
stack of BSD4.2. Having such features just does not make any sense, and
looking at the code, I'm not sure it actually works.
diffstat:
sys/netinet/tcp_timer.c | 22 +++++++---------------
sys/netinet/tcp_usrreq.c | 10 ++--------
sys/netinet/tcp_var.h | 4 +---
3 files changed, 10 insertions(+), 26 deletions(-)
diffs (99 lines):
diff -r 3f05cd996487 -r 8681d65b603f sys/netinet/tcp_timer.c
--- a/sys/netinet/tcp_timer.c Fri Jul 28 17:57:48 2017 +0000
+++ b/sys/netinet/tcp_timer.c Fri Jul 28 19:16:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_timer.c,v 1.91 2016/07/25 00:10:38 knakahara Exp $ */
+/* $NetBSD: tcp_timer.c,v 1.92 2017/07/28 19:16:41 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_timer.c,v 1.91 2016/07/25 00:10:38 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_timer.c,v 1.92 2017/07/28 19:16:41 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -564,19 +564,11 @@
* correspondent TCP to respond.
*/
TCP_STATINC(TCP_STAT_KEEPPROBE);
- if (tcp_compat_42) {
- /*
- * The keepalive packet must have nonzero
- * length to get a 4.2 host to respond.
- */
- (void)tcp_respond(tp, tp->t_template,
- NULL, NULL, tp->rcv_nxt - 1,
- tp->snd_una - 1, 0);
- } else {
- (void)tcp_respond(tp, tp->t_template,
- NULL, NULL, tp->rcv_nxt,
- tp->snd_una - 1, 0);
- }
+
+ (void)tcp_respond(tp, tp->t_template,
+ NULL, NULL, tp->rcv_nxt,
+ tp->snd_una - 1, 0);
+
TCP_TIMER_ARM(tp, TCPT_KEEP, tp->t_keepintvl);
} else
TCP_TIMER_ARM(tp, TCPT_KEEP, tp->t_keepidle);
diff -r 3f05cd996487 -r 8681d65b603f sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c Fri Jul 28 17:57:48 2017 +0000
+++ b/sys/netinet/tcp_usrreq.c Fri Jul 28 19:16:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.214 2017/01/24 07:09:24 ozaki-r Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.215 2017/07/28 19:16:41 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.214 2017/01/24 07:09:24 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.215 2017/07/28 19:16:41 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2152,12 +2152,6 @@
CTL_NET, pf, IPPROTO_TCP, TCPCTL_TSTAMP, CTL_EOL);
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
- CTLTYPE_INT, "compat_42",
- SYSCTL_DESCR("Enable workarounds for 4.2BSD TCP bugs"),
- NULL, 0, &tcp_compat_42, 0,
- CTL_NET, pf, IPPROTO_TCP, TCPCTL_COMPAT_42, CTL_EOL);
- sysctl_createv(clog, 0, NULL, NULL,
- CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "cwm",
SYSCTL_DESCR("Hughes/Touch/Heidemann Congestion Window "
"Monitoring"),
diff -r 3f05cd996487 -r 8681d65b603f sys/netinet/tcp_var.h
--- a/sys/netinet/tcp_var.h Fri Jul 28 17:57:48 2017 +0000
+++ b/sys/netinet/tcp_var.h Fri Jul 28 19:16:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_var.h,v 1.178 2017/07/07 01:37:34 ozaki-r Exp $ */
+/* $NetBSD: tcp_var.h,v 1.179 2017/07/28 19:16:41 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -811,7 +811,6 @@
extern int tcp_init_win_local; /* initial window for local nets */
extern int tcp_init_win_max[11];/* max sizes for values of tcp_init_win_* */
extern int tcp_mss_ifmtu; /* take MSS from interface, not in_maxmtu */
-extern int tcp_compat_42; /* work around ancient broken TCP peers */
extern int tcp_cwm; /* enable Congestion Window Monitoring */
extern int tcp_cwm_burstsize; /* burst size allowed by CWM */
extern int tcp_ack_on_push; /* ACK immediately on PUSH */
@@ -877,7 +876,6 @@
{ 1, 0, &tcp_do_sack }, \
{ 1, 0, &tcp_do_win_scale }, \
{ 1, 0, &tcp_do_timestamps }, \
- { 1, 0, &tcp_compat_42 }, \
{ 1, 0, &tcp_cwm }, \
{ 1, 0, &tcp_cwm_burstsize }, \
{ 1, 0, &tcp_ack_on_push }, \
Home |
Main Index |
Thread Index |
Old Index