maybe works now

This commit is contained in:
PoliEcho 2025-08-01 18:41:17 +02:00
parent 0a32061960
commit 582d458f70

View File

@ -23,14 +23,14 @@ pub fn create_tun_interface(
return Ok(tun_iface);
}
pub async fn read_tun_iface(
pub fn read_tun_iface(
tun_iface: Arc<tappers::Tun>,
socket: Arc<std::net::UdpSocket>,
network: Arc<RwLock<Network>>,
) {
let mut buf: [u8; IP_BUFFER_SIZE] = [0u8; IP_BUFFER_SIZE];
smol::block_on(async {
loop {
#[cfg(debug_assertions)]
eprintln!("Started listening for ip packets");
@ -41,7 +41,7 @@ pub async fn read_tun_iface(
socket.clone(),
))
.detach();
}
}});
}