diff options
author | Hristo Venev <hristo@venev.name> | 2019-03-19 20:12:36 +0200 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-03-19 20:12:36 +0200 |
commit | ea93592ee7dc072103af91c6eeab6e895118807e (patch) | |
tree | aec7101a60865dcd0b5e90638a64df42c764cbc3 /src | |
parent | d64ffe0b4e3ef6a86401f80f0c7717770c2ccbd1 (diff) |
Make sure the device exists on startup.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 0dbb235..637f01c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,6 +46,7 @@ pub struct Device { impl Device { pub fn new(ifname: String, c: config::Config) -> io::Result<Device> { let dev = wg::Device::new(ifname)?; + let _ = dev.get_public_key()?; Ok(Device { dev, |