Skip to content

Commit

Permalink
chore(udp): increase crate patch version to v0.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden authored and djc committed Dec 17, 2024
1 parent e953059 commit b720c6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion quinn-udp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quinn-udp"
version = "0.5.8"
version = "0.5.9"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
Expand Down
11 changes: 7 additions & 4 deletions quinn-udp/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,21 @@ fn test_send_recv(send: &Socket, recv: &Socket, transmit: Transmit) {
}
}

if match transmit.destination.ip() {
let ipv4_or_ipv4_mapped_ipv6 = match transmit.destination.ip() {
IpAddr::V4(_) => true,
IpAddr::V6(a) => a.to_ipv4_mapped().is_some(),
} && cfg!(target_os = "android")
};

// On Android API level <= 25 the IPv4 `IP_TOS` control message is
// not supported and thus ECN bits can not be received.
if ipv4_or_ipv4_mapped_ipv6
&& cfg!(target_os = "android")
&& std::env::var("API_LEVEL")
.ok()
.and_then(|v| v.parse::<u32>().ok())
.expect("API_LEVEL environment variable to be set on Android")
<= 25
{
// On Android API level <= 25 the IPv4 `IP_TOS` control message is
// not supported and thus ECN bits can not be received.
assert_eq!(meta.ecn, None);
} else {
assert_eq!(meta.ecn, transmit.ecn);
Expand Down

0 comments on commit b720c6a

Please sign in to comment.