diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-07 22:27:03 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-10 16:08:03 +0200 |
commit | 233f079a9479279d2aab68f4accb139ee87ad664 (patch) | |
tree | 338dfb681ffafbb53b81d353aa5612866ff935f5 /constants.go | |
parent | 375dcbd4aefc8054700dcb072a5e74a9ed7e9d39 (diff) |
Rewrite timers and related state machines
Diffstat (limited to 'constants.go')
-rw-r--r-- | constants.go | 27 |
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 */ |