diff --git a/src/network/tun_win.rs b/src/network/tun_win.rs index 72dd0dc..566c339 100644 --- a/src/network/tun_win.rs +++ b/src/network/tun_win.rs @@ -51,7 +51,8 @@ impl Iface { let ip = ip_to_string(&ip); let netbit = ip_to_string(&net_bit_len_to_mask(netbit)); - let res = Command::new("netsh") + let mut cmd = Command::new("netsh"); + let command = cmd .arg("interface") .arg("ip") .arg("set") @@ -59,11 +60,13 @@ impl Iface { .arg(&format!("name=\"{}\"", self.name)) .arg("source=static") .arg(&format!("addr={}", ip)) - .arg(&format!("mask={}", netbit)) - .output(); + .arg(&format!("mask={}", netbit)); + + let res = command.output(); + match res { - Ok(_) => { - debug!("netsh ok"); + Ok(r) => { + debug!("netsh ok: {:?}", r); } Err(e) => { error!("failed to run netsh: {}", e.to_string());