netstack: enable SACK by default

There's no reason not to turn this on. Leaving it off makes it possible for
users to miss it.

PiperOrigin-RevId: 634026749
This commit is contained in:
Kevin Krakauer
2024-05-15 11:51:26 -07:00
committed by gVisor bot
parent 6a7e4c2102
commit 9f11a5b375
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ var (
func newTestContext(t *testing.T) *testContext {
t.Helper()
localNIC, remoteNIC := pipe.New("" /* linkAddr1 */, "" /* linkAddr2 */, header.IPv4MinimumMTU)
localNIC, remoteNIC := pipe.New("" /* linkAddr1 */, "" /* linkAddr2 */, 1500)
localStack := stack.New(stack.Options{
NetworkProtocols: []stack.NetworkProtocolFactory{ipv4.NewProtocol},
+1
View File
@@ -535,6 +535,7 @@ func NewProtocol(s *stack.Stack) stack.TransportProtocol {
Default: DefaultReceiveBufferSize,
Max: MaxBufferSize,
},
sackEnabled: true,
congestionControl: ccReno,
availableCongestionControl: []string{ccReno, ccCubic},
moderateReceiveBuffer: true,