Skip to content

Commit ffc830a

Browse files
authored
wgengine/netstack: revert cubic cc to reno cc (tailscale#15677) (tailscale#15709)
Cherry-picked from 62182fc. Updates google/gvisor#11632 Updates tailscale/corp#27717 Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 parent 25df2e8 commit ffc830a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

wgengine/netstack/netstack.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,15 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
326326
if tcpipErr != nil {
327327
return nil, fmt.Errorf("could not disable TCP RACK: %v", tcpipErr)
328328
}
329-
cubicOpt := tcpip.CongestionControlOption("cubic")
330-
tcpipErr = ipstack.SetTransportProtocolOption(tcp.ProtocolNumber, &cubicOpt)
329+
// gVisor defaults to reno at the time of writing. We explicitly set reno
330+
// congestion control in order to prevent unexpected changes. Netstack
331+
// has an int overflow in sender congestion window arithmetic that is more
332+
// prone to trigger with cubic congestion control.
333+
// See https://github.com/google/gvisor/issues/11632
334+
renoOpt := tcpip.CongestionControlOption("reno")
335+
tcpipErr = ipstack.SetTransportProtocolOption(tcp.ProtocolNumber, &renoOpt)
331336
if tcpipErr != nil {
332-
return nil, fmt.Errorf("could not set cubic congestion control: %v", tcpipErr)
337+
return nil, fmt.Errorf("could not set reno congestion control: %v", tcpipErr)
333338
}
334339
err := setTCPBufSizes(ipstack)
335340
if err != nil {

0 commit comments

Comments
 (0)