From 118d48b4febd047175c7adcd9cc9a884ca64a2db Mon Sep 17 00:00:00 2001 From: alterdekim Date: Tue, 10 Dec 2024 04:39:38 +0300 Subject: [PATCH] modified: frida_core/src/mac_tun.rs --- frida_core/src/mac_tun.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frida_core/src/mac_tun.rs b/frida_core/src/mac_tun.rs index fb48bf5..fc3e727 100644 --- a/frida_core/src/mac_tun.rs +++ b/frida_core/src/mac_tun.rs @@ -18,7 +18,7 @@ fn cmd(cmd: &str, args: &[&str]) { pub fn create(cfg: AbstractDevice) -> (DeviceReader, DeviceWriter) { let iface = Iface::new("tun%d", Mode::Tun).unwrap(); - let address = cfg.address.unwrap().to_string(); + let mut address = cfg.address.unwrap().to_string(); address.push_str("/24"); cmd("ip", &["addr", "add", "dev", iface.name(), &address]); @@ -41,12 +41,12 @@ pub struct DeviceReader { impl DeviceWriter { pub async fn write(&self, buf: &Vec) -> Result> { - self.writer.send(buf) + Ok(self.writer.send(buf)?) } } impl DeviceReader { pub async fn read(&self, buf: &mut Vec) -> Result> { - self.reader.recv(buf) + Ok(self.reader.recv(buf)?) } } \ No newline at end of file