Skip to content

Commit 0a356af

Browse files
authored
fix: Fix QNS test errors with nginx (#2568)
* fix: Fix QNS test errors with `nginx` And hopefully `haproxy`. The old code caused ACK-ECN frames to be sent that had all-zero counts, which I don't think is a violation of the RFC, but we still shouldn't do. Fixes #2566. * Bump version
1 parent e59243c commit 0a356af

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Diff for: Cargo.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ description = "Neqo, the Mozilla implementation of QUIC in Rust."
2020
keywords = ["quic", "http3", "neqo", "mozilla", "ietf", "firefox"]
2121
categories = ["network-programming", "web-programming"]
2222
readme = "README.md"
23-
version = "0.13.0"
23+
version = "0.13.1"
2424
# Keep in sync with `.rustfmt.toml` `edition`.
2525
edition = "2021"
2626
license = "MIT OR Apache-2.0"

Diff for: neqo-transport/src/ecn.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,16 @@ impl Count {
103103
Self(EnumMap::from_array([not_ect, ect1, ect0, ce]))
104104
}
105105

106-
/// Whether any of the ECN counts are non-zero.
106+
/// Whether any of the ECT(0), ECT(1) or CE counts are non-zero.
107107
#[must_use]
108108
pub fn is_some(&self) -> bool {
109-
self.0.iter().any(|(_, &count)| count > 0)
109+
self[IpTosEcn::Ect0] > 0 || self[IpTosEcn::Ect1] > 0 || self[IpTosEcn::Ce] > 0
110110
}
111111

112-
/// Whether all of the ECN counts are zero.
112+
/// Whether all of the ECN counts are zero (including Not-ECT.)
113113
#[must_use]
114114
pub fn is_empty(&self) -> bool {
115-
!self.is_some()
115+
self.iter().all(|(_, count)| *count == 0)
116116
}
117117
}
118118

0 commit comments

Comments
 (0)