meta: cargo update & fmt
parent
b4fb9f9250
commit
fed0c859c8
|
@ -323,9 +323,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
|
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -728,9 +728,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.26"
|
version = "1.0.27"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
|
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
|
@ -362,9 +362,7 @@ fn redeem_invite(
|
||||||
target_conf.to_string_lossy().yellow()
|
target_conf.to_string_lossy().yellow()
|
||||||
);
|
);
|
||||||
|
|
||||||
log::info!(
|
log::info!("Changing keys and waiting for server's WireGuard interface to transition.",);
|
||||||
"Changing keys and waiting for server's WireGuard interface to transition.",
|
|
||||||
);
|
|
||||||
DeviceUpdate::new()
|
DeviceUpdate::new()
|
||||||
.set_private_key(keypair.private)
|
.set_private_key(keypair.private)
|
||||||
.apply(&iface, network.backend)?;
|
.apply(&iface, network.backend)?;
|
||||||
|
|
|
@ -6,7 +6,9 @@ use ipnetwork::IpNetwork;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use rusqlite::Connection;
|
use rusqlite::Connection;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use shared::{AddCidrOpts, DeleteCidrOpts, AddPeerOpts, IoErrorContext, NetworkOpt, INNERNET_PUBKEY_HEADER};
|
use shared::{
|
||||||
|
AddCidrOpts, AddPeerOpts, DeleteCidrOpts, IoErrorContext, NetworkOpt, INNERNET_PUBKEY_HEADER,
|
||||||
|
};
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, VecDeque},
|
collections::{HashMap, VecDeque},
|
||||||
convert::TryInto,
|
convert::TryInto,
|
||||||
|
@ -93,7 +95,6 @@ enum Command {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
args: DeleteCidrOpts,
|
args: DeleteCidrOpts,
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Db = Arc<Mutex<Connection>>;
|
pub type Db = Arc<Mutex<Connection>>;
|
||||||
|
@ -327,7 +328,11 @@ fn add_cidr(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete_cidr(interface: &InterfaceName, conf: &ServerConfig, args: DeleteCidrOpts) -> Result<(), Error> {
|
fn delete_cidr(
|
||||||
|
interface: &InterfaceName,
|
||||||
|
conf: &ServerConfig,
|
||||||
|
args: DeleteCidrOpts,
|
||||||
|
) -> Result<(), Error> {
|
||||||
println!("Fetching eligible CIDRs");
|
println!("Fetching eligible CIDRs");
|
||||||
let conn = open_database_connection(interface, conf)?;
|
let conn = open_database_connection(interface, conf)?;
|
||||||
let cidrs = DatabaseCidr::list(&conn)?;
|
let cidrs = DatabaseCidr::list(&conn)?;
|
||||||
|
|
Loading…
Reference in New Issue