From b1d57877264c2b94e3024375efc9914881f0bbe8 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Mon, 15 Mar 2021 18:47:41 -0700 Subject: Make netstack (//pkg/tcpip) buildable for 32 bit Doing so involved breaking dependencies between //pkg/tcpip and the rest of gVisor, which are discouraged anyways. Tested on the Go branch via: gvisor.dev/gvisor/pkg/tcpip/... Addresses #1446. PiperOrigin-RevId: 363081778 --- pkg/tcpip/transport/tcp/snd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/tcpip/transport/tcp') diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index 18817029d..faca35892 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -323,7 +323,9 @@ func newSender(ep *endpoint, iss, irs seqnum.Value, sndWnd seqnum.Size, mss uint // their initial values. func (s *sender) initCongestionControl(congestionControlName tcpip.CongestionControlOption) congestionControl { s.sndCwnd = InitialCwnd - s.sndSsthresh = math.MaxInt64 + // Set sndSsthresh to the maximum int value, which depends on the + // platform. + s.sndSsthresh = int(^uint(0) >> 1) switch congestionControlName { case ccCubic: -- cgit v1.2.3