Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161087978
D51069.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51069.diff
View Options
diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4
--- a/share/man/man4/tcp.4
+++ b/share/man/man4/tcp.4
@@ -785,8 +785,8 @@
are local.
.Va msl_local
is only used if
-.Va nolocaltimewait
-is zero.
+.Va nolocaltimewait ,
+which is deprecated, is zero.
.It Va mssdflt
The default value used for the TCP Maximum Segment Size
.Pq Dq MSS
@@ -798,10 +798,16 @@
That prevents self-inflicted packet losses once the application starts to
transmit data at a higher speed.
.It Va nolocaltimewait
-Suppress creation of TCP
+Suppress the creation of TCP
.Dv TIME_WAIT
states for connections in
which both endpoints are local.
+The default is 0.
+.Va nolocaltimewait
+is deprecated and will be removed in
+.Fx 16 .
+.Va msl_local
+can be used instead.
.It Va path_mtu_discovery
Enable Path MTU Discovery.
.It Va pcbcount
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -87,10 +87,28 @@
#include <security/mac/mac_framework.h>
-VNET_DEFINE_STATIC(bool, nolocaltimewait) = true;
+VNET_DEFINE_STATIC(bool, nolocaltimewait) = false;
#define V_nolocaltimewait VNET(nolocaltimewait)
-SYSCTL_BOOL(_net_inet_tcp, OID_AUTO, nolocaltimewait,
- CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nolocaltimewait), 0,
+
+static int
+sysctl_net_inet_tcp_nolocaltimewait(SYSCTL_HANDLER_ARGS)
+{
+ int error;
+ bool new;
+
+ new = V_nolocaltimewait;
+ error = sysctl_handle_bool(oidp, &new, 0, req);
+ if (error == 0 && req->newptr) {
+ V_nolocaltimewait = new;
+ gone_in(16, "net.inet.tcp.nolocaltimewait is obsolete."
+ " Use net.inet.tcp.local_msl instead.\n");
+ }
+ return (error);
+}
+
+SYSCTL_PROC(_net_inet_tcp, OID_AUTO, nolocaltimewait,
+ CTLFLAG_VNET | CTLFLAG_RW | CTLTYPE_U8,
+ &VNET_NAME(nolocaltimewait), 0, sysctl_net_inet_tcp_nolocaltimewait, "CU",
"Do not create TCP TIME_WAIT state for local connections");
static u_int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 1, 11:12 AM (22 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34557028
Default Alt Text
D51069.diff (1 KB)
Attached To
Mode
D51069: tcp: disable nolocaltimewait and deprecate it
Attached
Detach File
Event Timeline
Log In to Comment