aboutsummaryrefslogtreecommitdiffstats
path: root/src/timers.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-29 18:46:31 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-29 18:46:31 +0100
commit471f7ff08e897a6b4f2779e10d28aeb0a5b9e0e4 (patch)
tree7a1e4381ec8d3dc906efd4ddf82ee5f75da9a28a /src/timers.go
parentBetter naming of bind helpers (diff)
downloadwireguard-go-471f7ff08e897a6b4f2779e10d28aeb0a5b9e0e4.tar.xz
wireguard-go-471f7ff08e897a6b4f2779e10d28aeb0a5b9e0e4.zip
Added cross namespace TUN status detection
Diffstat (limited to '')
-rw-r--r--src/timers.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/timers.go b/src/timers.go
index 31165a3..d372b0d 100644
--- a/src/timers.go
+++ b/src/timers.go
@@ -321,8 +321,14 @@ func (peer *Peer) RoutineHandshakeInitiator() {
goto BeginHandshakes
case <-timeout.C:
- // TODO: Clear source address for peer
- continue
+
+ // clear source address of peer
+
+ peer.mutex.Lock()
+ if peer.endpoint != nil {
+ peer.endpoint.ClearSrc()
+ }
+ peer.mutex.Unlock()
}
}