diff --git a/mycelium/src/message.rs b/mycelium/src/message.rs index 9e5cb0f1..46091ba1 100644 --- a/mycelium/src/message.rs +++ b/mycelium/src/message.rs @@ -1106,8 +1106,7 @@ impl MessageId { fn new() -> Self { let mut id = Self([0u8; 8]); - id.0.try_fill(&mut rand::thread_rng()) - .expect("Can instantiate new ID from thread RNG generator; qed"); + id.0.fill(&mut rand::rng()); id } diff --git a/mycelium/src/tun/linux.rs b/mycelium/src/tun/linux.rs index 52b2b139..55217228 100644 --- a/mycelium/src/tun/linux.rs +++ b/mycelium/src/tun/linux.rs @@ -119,8 +119,11 @@ fn create_tun_interface(name: &str) -> Result> { let tun = TunBuilder::new() .name(name) .mtu(LINK_MTU) + .queues(1) .up() - .try_build()?; + .build()? + .pop() + .expect("Succesfully build tun interface has 1 queue"); Ok(tun) }