parent
40e8ca68f9
commit
61b055c44b
|
@ -284,7 +284,10 @@ fn install(
|
||||||
|
|
||||||
let target_conf = CLIENT_CONFIG_DIR.join(&iface).with_extension("conf");
|
let target_conf = CLIENT_CONFIG_DIR.join(&iface).with_extension("conf");
|
||||||
if target_conf.exists() {
|
if target_conf.exists() {
|
||||||
bail!("An interface with this name already exists in innernet.");
|
bail!("An existing innernet network with the name \"{}\" already exists.", iface);
|
||||||
|
}
|
||||||
|
if Device::list(network.backend)?.iter().any(|name| name.as_str_lossy() == iface) {
|
||||||
|
bail!("An existing WireGuard interface with the name \"{}\" already exists.", iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
let iface = iface.parse()?;
|
let iface = iface.parse()?;
|
||||||
|
|
Loading…
Reference in New Issue