diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-17 19:52:40 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-17 19:52:40 +0100 |
commit | 64707b0471b5efe06ac2c93e350676d9d4049b72 (patch) | |
tree | 04276f7085fa90e4470986da1d66ce44faa4b24d /src/platform/linux | |
parent | Update UAPI semantics for remove (diff) | |
download | wireguard-rs-64707b0471b5efe06ac2c93e350676d9d4049b72.tar.xz wireguard-rs-64707b0471b5efe06ac2c93e350676d9d4049b72.zip |
Update configuration API
Diffstat (limited to 'src/platform/linux')
-rw-r--r-- | src/platform/linux/uapi.rs | 2 | ||||
-rw-r--r-- | src/platform/linux/udp.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/linux/uapi.rs b/src/platform/linux/uapi.rs index fdf2bf0..107745a 100644 --- a/src/platform/linux/uapi.rs +++ b/src/platform/linux/uapi.rs @@ -24,7 +24,7 @@ impl BindUAPI for UnixListener { type Stream = UnixStream; type Error = io::Error; - fn accept(&self) -> Result<UnixStream, io::Error> { + fn connect(&self) -> Result<UnixStream, io::Error> { let (stream, _) = self.accept()?; Ok(stream) } diff --git a/src/platform/linux/udp.rs b/src/platform/linux/udp.rs index d3d61b6..a291d1a 100644 --- a/src/platform/linux/udp.rs +++ b/src/platform/linux/udp.rs @@ -43,15 +43,15 @@ impl Owner for LinuxOwner { type Error = io::Error; fn get_port(&self) -> u16 { - 1337 + self.0.local_addr().unwrap().port() // todo handle } fn get_fwmark(&self) -> Option<u32> { None } - fn set_fwmark(&mut self, value: Option<u32>) -> Option<Self::Error> { - None + fn set_fwmark(&mut self, _value: Option<u32>) -> Result<(), Self::Error> { + Ok(()) } } |