This commit is contained in:
lubeilin
2023-07-17 22:56:37 +08:00
parent 8d44934382
commit 6b988e0612
13 changed files with 148 additions and 38 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ pub fn create_device(device_type: DeviceType,
fn add_route(name: &str, address: Ipv4Addr, netmask: Ipv4Addr) -> io::Result<()> {
let route_add_str: String = format!(
"sudo route -n add -net {:?}/{:?} -interface {}",
"route -n add {} -netmask {} -interface {}",
address, netmask, name
);
let route_add_out = Command::new("sh")