wgengine/netstack: disable RACK again

Several reports including a severe internal issue have demonstrated use
cases where the current RACK implementation still fails too poorly to be
our enabled default.

Updates #21946
Updates #21651
Updates #18307

Signed-off-by: James Tucker <[email protected]>
(cherry picked from commit 1a28f170f6)
This commit is contained in:
James Tucker committed 2026-11-02 12:03:24 -08:00
1 parent dbbd47c83d
commit b571dac619
2 files changed
+12 -10

No files matched your search

+11 -9
View File
@@ -408,16 +408,18 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
if tcpipErr != nil {
return nil, fmt.Errorf("could not set cubic congestion control: %v", tcpipErr)
}
if rack, ok := netstackEnableRACK().Get(); ok {
recovery := tcpip.TCPRecovery(0)
if rack {
recovery = tcpip.TCPRACKLossDetection
}
tcpipErr = ns.ipstack.SetTransportProtocolOption(tcp.ProtocolNumber, &recovery)
if tcpipErr != nil {
return nil, fmt.Errorf("could not set TCP loss recovery: %v", tcpipErr)
}
// Disable RACK by default (again), the conditions under which it performs
// poorly are too common still. See google/gvisor#16670, #21946, #18714.
recovery := tcpip.TCPRecovery(0)
if rack, ok := netstackEnableRACK().Get(); ok && rack {
recovery = tcpip.TCPRACKLossDetection
}
tcpipErr = ns.ipstack.SetTransportProtocolOption(tcp.ProtocolNumber, &recovery)
if tcpipErr != nil {
return nil, fmt.Errorf("could not set TCP loss recovery: %v", tcpipErr)
}
err := setTCPBufSizes(ns.ipstack)
if err != nil {
return nil, err
+1 -1
View File
@@ -973,7 +973,7 @@ func TestEnableRACKKnob(t *testing.T) {
env string
want tcpip.TCPRecovery
}{
{"", tcpip.TCPRACKLossDetection},
{"", 0},
{"false", 0},
{"true", tcpip.TCPRACKLossDetection},
} {