Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed it #29

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

martinthomson
Copy link

No description provided.

ZeroRttState::AcceptedServer
}
_ => ZeroRttState::Rejected,
self.zero_rtt_state = if self.crypto.enable_0rtt(self.version, self.role) == Ok(true) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just factoring and more logging.

@@ -53,7 +53,7 @@ pub fn fixture_init() {

// This needs to be > 2ms to avoid it being rounded to zero.
// NSS operates in milliseconds and halves any value it is provided.
pub const ANTI_REPLAY_WINDOW: Duration = Duration::from_millis(10);
pub const ANTI_REPLAY_WINDOW: Duration = Duration::from_millis(10000);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the real fix.

NSS estimates the RTT. There is a very small allowance for dropped packets and variations in network delay. The test you wrote added a bunch of extra delay that looked - at least to NSS - like additional delays.

@larseggert larseggert merged commit bba53bc into larseggert:test-0rtt-loss Aug 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants