From ea93592ee7dc072103af91c6eeab6e895118807e Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Tue, 19 Mar 2019 20:12:36 +0200 Subject: Make sure the device exists on startup. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main.rs') 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 { let dev = wg::Device::new(ifname)?; + let _ = dev.get_public_key()?; Ok(Device { dev, -- cgit