aboutsummaryrefslogtreecommitdiffstats
path: root/src/handshake/device.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-24 23:41:05 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-24 23:41:05 +0200
commit2272e5250f7be8d28f4a9b5f75798da05ac85769 (patch)
tree03fabb5f17c34cafdae3ff03513ae38e3f74f579 /src/handshake/device.rs
parentAllow DoS mitigation to take any endpoint impl. (diff)
downloadwireguard-rs-2272e5250f7be8d28f4a9b5f75798da05ac85769.tar.xz
wireguard-rs-2272e5250f7be8d28f4a9b5f75798da05ac85769.zip
Move to hjul crate
Moved timer code into seperate crate (`hjul').
Diffstat (limited to 'src/handshake/device.rs')
-rw-r--r--src/handshake/device.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/handshake/device.rs b/src/handshake/device.rs
index d29c41b..f439414 100644
--- a/src/handshake/device.rs
+++ b/src/handshake/device.rs
@@ -202,7 +202,10 @@ where
rng: &mut R, // rng instance to sample randomness from
msg: &[u8], // message buffer
src: Option<&'a S>, // optional source endpoint, set when "under load"
- ) -> Result<Output<T>, HandshakeError> where &'a S: Into<&'a SocketAddr> {
+ ) -> Result<Output<T>, HandshakeError>
+ where
+ &'a S: Into<&'a SocketAddr>,
+ {
match msg.get(0) {
Some(&TYPE_INITIATION) => {
// parse message