From 6e307fc70e19093869311a04060cddf120b3c31e Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Fri, 19 Jun 2020 23:45:56 +0200 Subject: Replace RwLock with DashMap in handshake --- src/wireguard/peer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/wireguard/peer.rs') diff --git a/src/wireguard/peer.rs b/src/wireguard/peer.rs index 27d39bd..37b4684 100644 --- a/src/wireguard/peer.rs +++ b/src/wireguard/peer.rs @@ -22,13 +22,15 @@ pub struct PeerInner { // wireguard device state pub wg: WireGuard, + // TODO: eliminate + pub pk: PublicKey, + // handshake state pub walltime_last_handshake: Mutex>, // walltime for last handshake (for UAPI status) pub last_handshake_sent: Mutex, // instant for last handshake - pub handshake_queued: AtomicBool, // is a handshake job currently queued for the peer? + pub handshake_queued: AtomicBool, // is a handshake job currently queued? // stats and configuration - pub pk: PublicKey, // public key (TODO: there has to be a way to remove this) pub rx_bytes: AtomicU64, // received bytes pub tx_bytes: AtomicU64, // transmitted bytes -- cgit v1.2.3-11-g984f