aboutsummaryrefslogtreecommitdiffstats
path: root/src/wireguard/timers.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-27 16:59:54 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-11-27 16:59:54 +0100
commit04f507556baf2336a613cb684ec98f2cdf519163 (patch)
tree4b7c88b000615e63bc7e5846930e6a36a461a108 /src/wireguard/timers.rs
parentEnable up/down from configuration interface (diff)
downloadwireguard-rs-04f507556baf2336a613cb684ec98f2cdf519163.tar.xz
wireguard-rs-04f507556baf2336a613cb684ec98f2cdf519163.zip
Work on netlink IF event code for Linux
Diffstat (limited to 'src/wireguard/timers.rs')
-rw-r--r--src/wireguard/timers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wireguard/timers.rs b/src/wireguard/timers.rs
index 18f49bf..0ce4210 100644
--- a/src/wireguard/timers.rs
+++ b/src/wireguard/timers.rs
@@ -221,14 +221,14 @@ impl<T: tun::Tun, B: udp::UDP> PeerInner<T, B> {
impl Timers {
- pub fn new<T, B>(runner: &Runner, peer: Peer<T, B>) -> Timers
+ pub fn new<T, B>(runner: &Runner, running: bool, peer: Peer<T, B>) -> Timers
where
T: tun::Tun,
B: udp::UDP,
{
// create a timer instance for the provided peer
Timers {
- enabled: true,
+ enabled: running,
keepalive_interval: 0, // disabled
need_another_keepalive: AtomicBool::new(false),
sent_lastminute_handshake: AtomicBool::new(false),