network: configure mtu and segmentation offloading properly

This commit is contained in:
Alex Zenla
2024-03-04 12:19:03 +00:00
parent 9350a7520d
commit 17889d1c64
8 changed files with 131 additions and 7 deletions

View File

@ -255,7 +255,10 @@ impl AsyncRawSocketChannel {
}
let buffer = (&buffer[0..len]).into();
if let Err(error) = receive_sender.try_send(buffer) {
debug!("raw socket failed to process received packet: {}", error);
debug!(
"failed to process received packet from raw socket: {}",
error
);
}
}
@ -276,7 +279,11 @@ impl AsyncRawSocketChannel {
debug!("failed to transmit: would block");
continue;
}
return Err(anyhow!("failed to write to raw socket: {}", error));
return Err(anyhow!(
"failed to write {} bytes to raw socket: {}",
packet.len(),
error
));
}
};
}