diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-02-03 08:51:34 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-02-03 08:51:34 -0300 |
| commit | 3289f39944593c7ca063c72ec2d27563ff390a09 (patch) | |
| tree | 759f0402cb0a29bbda0794f015ce41bd73c6e807 | |
| parent | 2b416f00a72c2c04894f119db7899eba89f06bfe (diff) | |
| parent | c7aa7a4320104000588c4cb7577ab88d4bfa2006 (diff) | |
| download | mullvadvpn-3289f39944593c7ca063c72ec2d27563ff390a09.tar.xz mullvadvpn-3289f39944593c7ca063c72ec2d27563ff390a09.zip | |
Merge branch 'improve-rotation-interval-constant'
| -rw-r--r-- | mullvad-daemon/src/wireguard.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mullvad-daemon/src/wireguard.rs b/mullvad-daemon/src/wireguard.rs index 9d6d25947f..0939a0afac 100644 --- a/mullvad-daemon/src/wireguard.rs +++ b/mullvad-daemon/src/wireguard.rs @@ -21,12 +21,11 @@ pub use talpid_types::net::wireguard::{ use talpid_types::ErrorExt; /// Default automatic key rotation -#[cfg(not(target_os = "android"))] -const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = Duration::from_secs(7 * 24 * 60 * 60); -/// Default automatic key rotation -#[cfg(target_os = "android")] -const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = Duration::from_secs(4 * 24 * 60 * 60); - +const DEFAULT_AUTOMATIC_KEY_ROTATION: Duration = if cfg!(target_os = "android") { + Duration::from_secs(4 * 24 * 60 * 60) +} else { + Duration::from_secs(7 * 24 * 60 * 60) +}; /// How long to wait before reattempting to rotate keys on failure const AUTOMATIC_ROTATION_RETRY_DELAY: Duration = Duration::from_secs(60 * 15); /// How long to wait before starting the first key rotation. |
