diff options
author | Hristo Venev <hristo@venev.name> | 2019-09-28 16:21:28 +0000 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-09-28 16:22:07 +0000 |
commit | 8e6318f29eb022126e82e0c084262c77d9ee3300 (patch) | |
tree | 0a6d8a88e1e1f96daff61e1d19b144f93aa8f256 /src/wg.rs | |
parent | 3a5552509439612accf579becc7cb85a596bd466 (diff) |
Implement peer overrides.
Diffstat (limited to 'src/wg.rs')
-rw-r--r-- | src/wg.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13,7 +13,7 @@ pub struct Device { impl Device { #[inline] - pub fn new(ifname: OsString) -> io::Result<Self> { + pub fn open(ifname: OsString) -> io::Result<Self> { let dev = Self { ifname }; let _ = dev.get_public_key()?; Ok(dev) @@ -67,7 +67,7 @@ impl Device { if *old_peer == *conf { continue; } - old_endpoint = old_peer.endpoint.clone(); + old_endpoint = old_peer.endpoint; } else { old_endpoint = None; } |