mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-27 23:09:08 +01:00
Add comment to explain working boundaries
This commit is contained in:
@@ -27,6 +27,11 @@ const (
|
|||||||
// REKEY_AFTER_TIME ~120s) so the rotation's own traffic — which itself renews the
|
// REKEY_AFTER_TIME ~120s) so the rotation's own traffic — which itself renews the
|
||||||
// activity signal — ages out before the next rekey, letting an idle tunnel stop
|
// activity signal — ages out before the next rekey, letting an idle tunnel stop
|
||||||
// rotating instead of self-sustaining.
|
// rotating instead of self-sustaining.
|
||||||
|
//
|
||||||
|
// INVARIANT: rotationActivityWindow < the gap between OnDataPathRekeyed calls. That
|
||||||
|
// gap converges to the WireGuard rehandshake interval (REKEY_AFTER_TIME 120s). Setting
|
||||||
|
// rotationActivityWindow to a value higher than 120s will make the rotation
|
||||||
|
// self-sustain (preventing going back to idle). Margin here is ~30s.
|
||||||
rotationActivityWindow = 90 * time.Second
|
rotationActivityWindow = 90 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user