Changes to be committed:
modified: src/client.rs
This commit is contained in:
parent
8592230790
commit
1b85269454
@ -29,7 +29,8 @@ fn configure_routes(endpoint_ip: &str, s_interface: Option<&str>) {
|
|||||||
|
|
||||||
let inter_name = if s_interface.is_some() { s_interface.unwrap() } else { &net_inter.name };
|
let inter_name = if s_interface.is_some() { s_interface.unwrap() } else { &net_inter.name };
|
||||||
|
|
||||||
let mut ip_output = Command::new("ip")
|
let mut ip_output = Command::new("sudo")
|
||||||
|
.arg("ip")
|
||||||
.arg("-4")
|
.arg("-4")
|
||||||
.arg("route")
|
.arg("route")
|
||||||
.arg("add")
|
.arg("add")
|
||||||
@ -43,7 +44,8 @@ fn configure_routes(endpoint_ip: &str, s_interface: Option<&str>) {
|
|||||||
error!("Failed to forward packets: {:?}", String::from_utf8_lossy(&ip_output.stderr));
|
error!("Failed to forward packets: {:?}", String::from_utf8_lossy(&ip_output.stderr));
|
||||||
}
|
}
|
||||||
|
|
||||||
ip_output = Command::new("ip")
|
ip_output = Command::new("sudo")
|
||||||
|
.arg("ip")
|
||||||
.arg("route")
|
.arg("route")
|
||||||
.arg("add")
|
.arg("add")
|
||||||
.arg(endpoint_ip.to_owned()+"/32")
|
.arg(endpoint_ip.to_owned()+"/32")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user