Skip to content

Commit b20cd59

Browse files
committed
quic: initiate key rotation earlier in connections
The QUIC interop runner "keyrotate" test requires that the client initiate a key rotation early in the connection. With our current ack frequency, it seems that we need to rotate within the first 300-400 packets for the test to pass. Reduce the initial key rotation from 1000 to 100 packets. Rotating earlier shouldn't have any real downsides (rotation is cheap and generally done once per connection, except for very long-lived connections), and this is simpler than providing a way to tune the rotation interval in one specific test. For golang/go#67138 Change-Id: I33d47ea35ed39f0a13c171adb2b0698f8c93050e Reviewed-on: https://go-review.googlesource.com/c/net/+/582855 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]>
1 parent f95a3b3 commit b20cd59

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

quic/packet_protection.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,13 @@ func (k *updatingKeyPair) init() {
351351
// We perform the first key update early in the connection so a peer
352352
// which does not support key updates will fail rapidly,
353353
// rather than after the connection has been long established.
354-
k.updateAfter = 1000
354+
//
355+
// The QUIC interop runner "keyupdate" test requires that the client
356+
// initiate a key rotation early in the connection. Increasing this
357+
// value may cause interop test failures; if we do want to increase it,
358+
// we should either skip the keyupdate test or provide a way to override
359+
// the setting in interop tests.
360+
k.updateAfter = 100
355361
}
356362

357363
func (k *updatingKeyPair) canRead() bool {

0 commit comments

Comments
 (0)