Skip to content

Commit

Permalink
Fix optimistic ack test and note randomness dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Jul 17, 2024
1 parent 0985728 commit 8aa2274
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quic/s2n-quic/src/tests/skip_packets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ fn optimistic_ack_mitigation() {

// Verify that both client and server are skipping packets for Optimistic
// Ack attack mitigation.
assert_eq!(server_skip_count, 5);
assert_eq!(client_skip_count, 5);
//
// The exact number of skipped packets depends on randomness, so this test may be changed by
// unrelated changes. The important thing is that both numbers are non-zero.
assert_eq!(server_skip_count, 4);
assert_eq!(client_skip_count, 4);
}

// Mimic an Optimistic Ack attack and confirm the connection is closed with
Expand Down

0 comments on commit 8aa2274

Please sign in to comment.