Skip to content

Commit

Permalink
quic: initiate key rotation earlier in connections
Browse files Browse the repository at this point in the history
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
  • Loading branch information
neild committed May 3, 2024
1 parent f95a3b3 commit b20cd59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion quic/packet_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,13 @@ func (k *updatingKeyPair) init() {
// We perform the first key update early in the connection so a peer
// which does not support key updates will fail rapidly,
// rather than after the connection has been long established.
k.updateAfter = 1000
//
// The QUIC interop runner "keyupdate" test requires that the client
// initiate a key rotation early in the connection. Increasing this
// value may cause interop test failures; if we do want to increase it,
// we should either skip the keyupdate test or provide a way to override
// the setting in interop tests.
k.updateAfter = 100
}

func (k *updatingKeyPair) canRead() bool {
Expand Down

0 comments on commit b20cd59

Please sign in to comment.