another off by one error

This commit is contained in:
PoliEcho 2025-08-01 19:35:09 +02:00
parent 6aa9fb27e6
commit 4a70fb61f9

View File

@ -37,7 +37,7 @@ pub fn read_tun_iface(
loop {
let data_lenght = tun_iface.recv(&mut buf).unwrap(); // build in auto termination, isn't it great
smol::spawn(handle_ip_packet(
buf[..data_lenght - 1].to_vec().into(),
buf[..data_lenght].to_vec().into(),
network.clone(),
socket.clone(),
))