maybe works now
This commit is contained in:
parent
0a32061960
commit
582d458f70
@ -23,14 +23,14 @@ pub fn create_tun_interface(
|
|||||||
return Ok(tun_iface);
|
return Ok(tun_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn read_tun_iface(
|
pub fn read_tun_iface(
|
||||||
tun_iface: Arc<tappers::Tun>,
|
tun_iface: Arc<tappers::Tun>,
|
||||||
socket: Arc<std::net::UdpSocket>,
|
socket: Arc<std::net::UdpSocket>,
|
||||||
network: Arc<RwLock<Network>>,
|
network: Arc<RwLock<Network>>,
|
||||||
) {
|
) {
|
||||||
let mut buf: [u8; IP_BUFFER_SIZE] = [0u8; IP_BUFFER_SIZE];
|
let mut buf: [u8; IP_BUFFER_SIZE] = [0u8; IP_BUFFER_SIZE];
|
||||||
|
|
||||||
|
smol::block_on(async {
|
||||||
loop {
|
loop {
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
eprintln!("Started listening for ip packets");
|
eprintln!("Started listening for ip packets");
|
||||||
@ -41,7 +41,7 @@ pub async fn read_tun_iface(
|
|||||||
socket.clone(),
|
socket.clone(),
|
||||||
))
|
))
|
||||||
.detach();
|
.detach();
|
||||||
}
|
}});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user