aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/timers.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-21 11:43:16 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-21 11:43:16 +0100
commit92dbb4c46a5651afb8f92375e0ed154673929eeb (patch)
treef274dbaa58256e1fb412ae3934e02e2b19cb47f5 /src/wireguard/timers.rs
parentBetter compartmentalization of cryptokey router (diff)
downloadwireguard-rs-92dbb4c46a5651afb8f92375e0ed154673929eeb.tar.xz
wireguard-rs-92dbb4c46a5651afb8f92375e0ed154673929eeb.zip
Clean dependencies and imports
Diffstat (limited to '')
-rw-r--r--src/wireguard/timers.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wireguard/timers.rs b/src/wireguard/timers.rs
index 8f6b3ee..bfd2583 100644
--- a/src/wireguard/timers.rs
+++ b/src/wireguard/timers.rs
@@ -36,6 +36,11 @@ impl Timers {
}
impl<T: tun::Tun, B: bind::Bind> PeerInner<T, B> {
+
+ pub fn get_keepalive_interval(&self) -> u64 {
+ self.timers().keepalive_interval
+ }
+
pub fn stop_timers(&self) {
// take a write lock preventing simultaneous timer events or "start_timers" call
let mut timers = self.timers_mut();
@@ -191,7 +196,6 @@ impl<T: tun::Tun, B: bind::Bind> PeerInner<T, B> {
self.timers_any_authenticated_packet_sent();
}
-
pub fn set_persistent_keepalive_interval(&self, secs: u64) {
let mut timers = self.timers_mut();
@@ -405,6 +409,6 @@ impl<T: tun::Tun, B: bind::Bind> Callbacks for Events<T, B> {
#[inline(always)]
fn key_confirmed(peer: &Self::Opaque) {
- peer.timers().retransmit_handshake.stop();
+ peer.timers_handshake_complete();
}
}