From dcd567c08f126b09548a98df0468ef1fe86d9f0a Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Sat, 1 Feb 2020 14:39:19 +0100 Subject: Squashed commit of the following: commit 1e26a0bef44e65023a97a16ecf3b123e688d19f7 Author: Mathias Hall-Andersen Date: Sat Feb 1 14:36:50 2020 +0100 Initial version of sticky sockets for Linux commit 605cc656ad235d09ba6cd12d03dee2c5e0a9a80a Author: Mathias Hall-Andersen Date: Thu Jan 30 14:57:00 2020 +0100 Clear src when sendmsg fails with EINVAL commit dffd2b228af70f681e2a161642bbdaa348419bf3 Author: Mathias Hall-Andersen Date: Sun Jan 26 14:01:28 2020 +0100 Fix typoes commit 2015663706fbe15ed1ac443a31de86b3e6c643c7 Author: Mathias Hall-Andersen Date: Sun Jan 26 13:51:59 2020 +0100 Restructure of public key -> peer state Restructured the mapping of public keys to peer state in the project. The handshake device is now generic over an opaque type, which enables it to be the sole place where public keys are mapped to the peer states. This gets rid of the "peer" map in the WireGuard devices and avoids having to include the public key in the handshake peer state. commit bbcfaad4bcc5cf16bacdef0cefe7d29ba1519a23 Author: Mathias Hall-Andersen Date: Fri Jan 10 21:10:27 2020 +0100 Fixed bind6 also binding on IPv4 commit acbca236b70598c20c24de474690bcad883241d4 Author: Mathias Hall-Andersen Date: Thu Jan 9 11:24:13 2020 +0100 Work on sticky sockets --- src/wireguard/handshake/types.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/wireguard/handshake/types.rs') diff --git a/src/wireguard/handshake/types.rs b/src/wireguard/handshake/types.rs index 5f984cc..ed2fcbb 100644 --- a/src/wireguard/handshake/types.rs +++ b/src/wireguard/handshake/types.rs @@ -1,10 +1,8 @@ +use super::super::types::KeyPair; + use std::error::Error; use std::fmt; -use x25519_dalek::PublicKey; - -use super::super::types::KeyPair; - /* Internal types for the noise IKpsk2 implementation */ // config error @@ -79,10 +77,10 @@ impl Error for HandshakeError { } } -pub type Output = ( - Option, // external identifier associated with peer - Option>, // message to send - Option, // resulting key-pair of successful handshake +pub type Output<'a, O> = ( + Option<&'a O>, // external identifier associated with peer + Option>, // message to send + Option, // resulting key-pair of successful handshake ); // preshared key -- cgit v1.2.3-59-g8ed1b