pull/284/head
Bradley Noyes 2023-08-26 08:55:33 -04:00
parent 13502aeb6c
commit 76648875c9
1 changed files with 0 additions and 17 deletions

View File

@ -300,23 +300,6 @@ fn start_userspace_wireguard(iface: &InterfaceName) -> io::Result<Output> {
}
}
fn _start_userspace_wireguard(iface: &InterfaceName) -> io::Result<Output> {
let mut command = Command::new(get_userspace_implementation());
let output = if cfg!(target_os = "linux") {
command.args(&[iface.to_string()]).output()?
} else {
command
.env("WG_TUN_NAME_FILE", &format!("{VAR_RUN_PATH}/{iface}.name"))
.args(["utun"])
.output()?
};
if !output.status.success() {
Err(io::ErrorKind::AddrNotAvailable.into())
} else {
Ok(output)
}
}
pub fn apply(builder: &DeviceUpdate, iface: &InterfaceName) -> io::Result<()> {
// If we can't open a configuration socket to an existing interface, try starting it.
let mut sock = match open_socket(iface) {