aboutsummaryrefslogtreecommitdiffstats
path: root/src/peer.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-09-20 09:26:08 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-09-20 09:26:08 +0200
commit47a21c8bb08c84d5f84e66ffd3b81ded957dda6d (patch)
tree99006a48c9aff4ba4c8bef0ae771715a20f1e2e2 /src/peer.go
parentImproved readability of send/receive code (diff)
downloadwireguard-go-47a21c8bb08c84d5f84e66ffd3b81ded957dda6d.tar.xz
wireguard-go-47a21c8bb08c84d5f84e66ffd3b81ded957dda6d.zip
Added last_minute_handshake_guard
- Added last_minute_handshake_guard and reverted keypair changes. - Added comment explaining the state of Go in releation to handling cryptographic state in memory. - Decreased logging level of netsh test
Diffstat (limited to '')
-rw-r--r--src/peer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/peer.go b/src/peer.go
index a4feb2f..6fea829 100644
--- a/src/peer.go
+++ b/src/peer.go
@@ -39,6 +39,8 @@ type Peer struct {
stop chan struct{} // (size 0) : close to stop all goroutines for peer
}
timer struct {
+ // state related to WireGuard timers
+
keepalivePersistent *time.Timer // set for persistent keepalives
keepalivePassive *time.Timer // set upon recieving messages
newHandshake *time.Timer // begin a new handshake (after Keepalive + RekeyTimeout)
@@ -49,7 +51,8 @@ type Peer struct {
pendingNewHandshake bool
pendingZeroAllKeys bool
- needAnotherKeepalive bool
+ needAnotherKeepalive bool
+ sendLastMinuteHandshake bool
}
queue struct {
nonce chan *QueueOutboundElement // nonce / pre-handshake queue