diff options
author | Kevin Krakauer <krakauer@google.com> | 2021-03-15 18:47:41 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-15 18:49:59 -0700 |
commit | b1d57877264c2b94e3024375efc9914881f0bbe8 (patch) | |
tree | fcc3ee1d6ff597411847c4beacd3d8349d33178a /pkg/tcpip/transport/tcp | |
parent | ec45d969236bb98a83e7da0466bd67e540c5e8b5 (diff) |
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
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r-- | pkg/tcpip/transport/tcp/snd.go | 4 |
1 files changed, 3 insertions, 1 deletions
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: |