fix GSO sending logic to respect ECN marking changes (#4835)

This commit is contained in:
Marten Seemann
2025-01-06 15:47:00 +08:00
committed by GitHub
parent 421332c716
commit febf2809e0
2 changed files with 2 additions and 2 deletions

View File

@@ -2029,6 +2029,7 @@ func (s *connection) sendPacketsWithGSO(now time.Time) error {
return nil
}
ecn = nextECN
buf = getLargePacketBuffer()
}
}

View File

@@ -2114,8 +2114,7 @@ func TestConnectionGSOBatchECN(t *testing.T) {
done3 := make(chan struct{})
tc.sendConn.EXPECT().Write(expectedData, uint16(maxPacketSize), protocol.ECT1)
// TODO(#4829): check that the correct ECN marking is used
tc.sendConn.EXPECT().Write([]byte("foobar"), uint16(maxPacketSize), gomock.Any()).DoAndReturn(
tc.sendConn.EXPECT().Write([]byte("foobar"), uint16(maxPacketSize), protocol.ECNCE).DoAndReturn(
func([]byte, uint16, protocol.ECN) error { close(done3); return nil },
)