diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-08 19:00:12 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-08 19:00:12 +0100 |
commit | dd85201c15244fbd380eef8ee359a535335b7250 (patch) | |
tree | 5ccbb72702b7c5da8e6ab570bde192f66fff66bc /src/wireguard/timers.rs | |
parent | Implement disable/enable timers (diff) | |
download | wireguard-rs-dd85201c15244fbd380eef8ee359a535335b7250.tar.xz wireguard-rs-dd85201c15244fbd380eef8ee359a535335b7250.zip |
Removal of secret key in the handshake module
Diffstat (limited to '')
-rw-r--r-- | src/wireguard/timers.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wireguard/timers.rs b/src/wireguard/timers.rs index 038f6c6..33b089f 100644 --- a/src/wireguard/timers.rs +++ b/src/wireguard/timers.rs @@ -35,7 +35,7 @@ impl Timers { } } -impl<B: bind::Bind> PeerInner<B> { +impl<T: tun::Tun, B: bind::Bind> PeerInner<T, B> { pub fn stop_timers(&self) { // take a write lock preventing simultaneous timer events or "start_timers" call let mut timers = self.timers_mut(); @@ -180,7 +180,6 @@ impl<B: bind::Bind> PeerInner<B> { */ pub fn sent_handshake_initiation(&self) { *self.last_handshake_sent.lock() = Instant::now(); - self.handshake_queued.store(false, Ordering::SeqCst); self.timers_set_retransmit_handshake(); self.timers_any_authenticated_packet_traversal(); self.timers_any_authenticated_packet_sent(); @@ -333,7 +332,7 @@ impl Timers { pub struct Events<T, B>(PhantomData<(T, B)>); impl<T: tun::Tun, B: bind::Bind> Callbacks for Events<T, B> { - type Opaque = Arc<PeerInner<B>>; + type Opaque = Arc<PeerInner<T, B>>; /* Called after the router encrypts a transport message destined for the peer. * This method is called, even if the encrypted payload is empty (keepalive) |