diff --git a/.github/workflows/_rust.yml b/.github/workflows/_rust.yml
index 8ab28d452..5995e3367 100644
--- a/.github/workflows/_rust.yml
+++ b/.github/workflows/_rust.yml
@@ -58,8 +58,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- rustup install --no-self-update nightly-2024-06-01 --profile minimal # The exact nightly version doesn't matter, just pin a random one.
- cargo +nightly-2024-06-01 udeps --all-targets --all-features ${{ steps.setup-rust.outputs.packages }}
+ rustup install --no-self-update nightly-2024-09-01 --profile minimal # The exact nightly version doesn't matter, just pin a random one.
+ cargo +nightly-2024-09-01 udeps --all-targets --all-features ${{ steps.setup-rust.outputs.packages }}
name: Check for unused dependencies
- run: cargo fmt -- --check
- run: cargo doc --all-features --no-deps --document-private-items ${{ steps.setup-rust.outputs.packages }}
diff --git a/rust/bin-shared/benches/tunnel.rs b/rust/bin-shared/benches/tunnel.rs
index 7e9ef20bd..7fb275e64 100644
--- a/rust/bin-shared/benches/tunnel.rs
+++ b/rust/bin-shared/benches/tunnel.rs
@@ -63,14 +63,14 @@ mod platform {
let mut response_pkt = None;
let mut time_spent = Duration::from_millis(0);
loop {
- let mut req_buf = [0u8; MTU];
- poll_fn(|cx| tun.poll_read(&mut req_buf, cx)).await?;
+ let mut req_buf = [0u8; MTU + 20];
+ poll_fn(|cx| tun.poll_read(&mut req_buf[20..], cx)).await?;
let start = Instant::now();
- let original_pkt = IpPacket::new(&req_buf).unwrap();
+ let original_pkt = IpPacket::new(&mut req_buf).unwrap();
let Some(original_udp) = original_pkt.as_udp() else {
continue;
};
- if original_udp.get_destination() != SERVER_PORT {
+ if original_udp.destination_port() != SERVER_PORT {
continue;
}
if original_udp.payload()[0] != REQ_CODE {
@@ -84,8 +84,8 @@ mod platform {
ip_packet::make::udp_packet(
original_pkt.destination(),
original_pkt.source(),
- original_udp.get_destination(),
- original_udp.get_source(),
+ original_udp.destination_port(),
+ original_udp.source_port(),
vec![RESP_CODE],
)
.unwrap()
diff --git a/rust/connlib/snownet/src/node.rs b/rust/connlib/snownet/src/node.rs
index 4308755d3..a9106e1a2 100644
--- a/rust/connlib/snownet/src/node.rs
+++ b/rust/connlib/snownet/src/node.rs
@@ -9,9 +9,7 @@ use boringtun::x25519::PublicKey;
use boringtun::{noise::rate_limiter::RateLimiter, x25519::StaticSecret};
use core::fmt;
use hex_display::HexDisplayExt;
-use ip_packet::{
- ConvertibleIpv4Packet, ConvertibleIpv6Packet, IpPacket, MutableIpPacket, Packet as _,
-};
+use ip_packet::{ConvertibleIpv4Packet, ConvertibleIpv6Packet, IpPacket, Packet as _};
use rand::rngs::StdRng;
use rand::seq::IteratorRandom;
use rand::{random, SeedableRng};
@@ -294,7 +292,7 @@ where
packet: &[u8],
now: Instant,
buffer: &'b mut [u8],
- ) -> Result