Fixed problem with reading from device

This commit is contained in:
Dennis Schwerdel 2016-07-03 09:47:58 +02:00
parent 91722f4270
commit 885b288025
1 changed files with 2 additions and 1 deletions

View File

@ -592,7 +592,8 @@ impl<P: Protocol> GenericCloud<P> {
},
fd if (fd == device_fd) => {
let start = 64;
let (start, size) = try_fail!(self.device.read(&mut buffer[start..]), "Failed to read from tap device: {}");
let (offset, size) = try_fail!(self.device.read(&mut buffer[start..]), "Failed to read from tap device: {}");
start += offset;
if let Err(e) = self.handle_interface_data(&mut buffer, start, start+size) {
error!("Error: {}", e);
}