diff options
author | Jake McGinty <me@jake.su> | 2018-02-24 16:45:08 +0000 |
---|---|---|
committer | Jake McGinty <me@jake.su> | 2018-02-24 16:45:08 +0000 |
commit | 930d2e80679703b1acdf7d0c9702e80d63f915ad (patch) | |
tree | fae21fc8f995196f1fb33f6b30ff9acfe8e7e989 /src/consts.rs | |
parent | rekey timer re-work for correctness (diff) | |
download | wireguard-rs-930d2e80679703b1acdf7d0c9702e80d63f915ad.tar.xz wireguard-rs-930d2e80679703b1acdf7d0c9702e80d63f915ad.zip |
zero-out timer
Diffstat (limited to 'src/consts.rs')
-rw-r--r-- | src/consts.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/consts.rs b/src/consts.rs index 8a3839d..6889ac7 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -6,14 +6,17 @@ use std::time::Duration; lazy_static! { pub static ref REKEY_ATTEMPT_TIME: Duration = Duration::new(90, 0); pub static ref REKEY_AFTER_TIME: Duration = Duration::new(120, 0); + pub static ref REKEY_AFTER_TIME_RECV: Duration = *REJECT_AFTER_TIME - *KEEPALIVE_TIMEOUT - *REKEY_TIMEOUT; pub static ref REJECT_AFTER_TIME: Duration = Duration::new(180, 0); - pub static ref REJECT_ALL_AFTER_TIME: Duration = *REJECT_AFTER_TIME * 3; + pub static ref WIPE_AFTER_TIME: Duration = *REJECT_AFTER_TIME * 3; + pub static ref REKEY_TIMEOUT: Duration = Duration::new(5, 0); pub static ref KEEPALIVE_TIMEOUT: Duration = Duration::new(10, 0); pub static ref STALE_SESSION_TIMEOUT: Duration = *KEEPALIVE_TIMEOUT + *REKEY_TIMEOUT; - pub static ref RECV_REKEY_AFTER_TIME: Duration = *REJECT_AFTER_TIME - *KEEPALIVE_TIMEOUT - *REKEY_TIMEOUT; + pub static ref TIMER_RESOLUTION: Duration = Duration::from_millis(100); pub static ref COOKIE_REFRESH_TIME: Duration = Duration::new(120, 0); + } // transport ratcheting message limits, in seconds |