mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
wgengine/netstack: disable RACK on Windows (#10402)
Updates #9707 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
parent
5f40b8a0bc
commit
5e861c3871
@ -184,6 +184,17 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
|
||||
if tcpipErr != nil {
|
||||
return nil, fmt.Errorf("could not enable TCP SACK: %v", tcpipErr)
|
||||
}
|
||||
if runtime.GOOS == "windows" {
|
||||
// See https://github.com/tailscale/tailscale/issues/9707
|
||||
// Windows w/RACK performs poorly. ACKs do not appear to be handled in a
|
||||
// timely manner, leading to spurious retransmissions and a reduced
|
||||
// congestion window.
|
||||
tcpRecoveryOpt := tcpip.TCPRecovery(0)
|
||||
tcpipErr = ipstack.SetTransportProtocolOption(tcp.ProtocolNumber, &tcpRecoveryOpt)
|
||||
if tcpipErr != nil {
|
||||
return nil, fmt.Errorf("could not disable TCP RACK: %v", tcpipErr)
|
||||
}
|
||||
}
|
||||
linkEP := channel.New(512, uint32(tstun.DefaultTUNMTU()), "")
|
||||
if tcpipProblem := ipstack.CreateNIC(nicID, linkEP); tcpipProblem != nil {
|
||||
return nil, fmt.Errorf("could not create netstack NIC: %v", tcpipProblem)
|
||||
|
Loading…
Reference in New Issue
Block a user