tcp: initialize sysctl_tcp_wan_timestamps to 1 by default.
when sysctl_tcp_timestamps = 1 and tcp_wan_timestamps = 0, client's SYN packet will contain tcp timestamp option, but other segment not, which violate RFC 7323, which states: " Once TSopt has been successfully negotiated, that is both <SYN> and <SYN,ACK> contain TSopt, the TSopt MUST be sent in every non-<RST> segment for the duration of the connection" also, this will break peer server with syn cookie activated, make it clear window scale and timestamp option, causing poor transmit performance. Signed-off-by: curuwang <curuwang@tencent.com>
This commit is contained in:
parent
8fafa5a142
commit
cf1f2c4f86
|
@ -3241,6 +3241,7 @@ static int __net_init tcp_sk_init(struct net *net)
|
|||
net->ipv4.sysctl_tcp_sack = 1;
|
||||
net->ipv4.sysctl_tcp_window_scaling = 1;
|
||||
net->ipv4.sysctl_tcp_timestamps = 1;
|
||||
net->ipv4.sysctl_tcp_wan_timestamps = 1;
|
||||
net->ipv4.sysctl_tcp_early_retrans = 3;
|
||||
net->ipv4.sysctl_tcp_recovery = TCP_RACK_LOSS_DETECTION;
|
||||
net->ipv4.sysctl_tcp_slow_start_after_idle = 1; /* By default, RFC2861 behavior. */
|
||||
|
|
Loading…
Reference in New Issue