aboutsummaryrefslogtreecommitdiffstats
path: root/constants.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-07 22:27:03 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-10 16:08:03 +0200
commit233f079a9479279d2aab68f4accb139ee87ad664 (patch)
tree338dfb681ffafbb53b81d353aa5612866ff935f5 /constants.go
parentMerge branch 'master' of ssh://git.zx2c4.com/wireguard-go (diff)
downloadwireguard-go-233f079a9479279d2aab68f4accb139ee87ad664.tar.xz
wireguard-go-233f079a9479279d2aab68f4accb139ee87ad664.zip
Rewrite timers and related state machines
Diffstat (limited to 'constants.go')
-rw-r--r--constants.go27
1 files changed, 12 insertions, 15 deletions
diff --git a/constants.go b/constants.go
index 04b75d7..01af1bb 100644
--- a/constants.go
+++ b/constants.go
@@ -12,21 +12,18 @@ import (
/* Specification constants */
const (
- RekeyAfterMessages = (1 << 64) - (1 << 16) - 1
- RejectAfterMessages = (1 << 64) - (1 << 4) - 1
- RekeyAfterTime = time.Second * 120
- RekeyAttemptTime = time.Second * 90
- RekeyTimeout = time.Second * 5
- RejectAfterTime = time.Second * 180
- KeepaliveTimeout = time.Second * 10
- CookieRefreshTime = time.Second * 120
- HandshakeInitationRate = time.Second / 20
- PaddingMultiple = 16
-)
-
-const (
- RekeyAfterTimeReceiving = RejectAfterTime - KeepaliveTimeout - RekeyTimeout
- NewHandshakeTime = KeepaliveTimeout + RekeyTimeout // upon failure to acknowledge transport message
+ RekeyAfterMessages = (1 << 64) - (1 << 16) - 1
+ RejectAfterMessages = (1 << 64) - (1 << 4) - 1
+ RekeyAfterTime = time.Second * 120
+ RekeyAttemptTime = time.Second * 90
+ RekeyTimeout = time.Second * 5
+ MaxTimerHandshakes = 90 / 5 /* RekeyAttemptTime / RekeyTimeout */
+ RekeyTimeoutJitterMaxMs = 334
+ RejectAfterTime = time.Second * 180
+ KeepaliveTimeout = time.Second * 10
+ CookieRefreshTime = time.Second * 120
+ HandshakeInitationRate = time.Second / 20
+ PaddingMultiple = 16
)
/* Implementation specific constants */