summaryrefslogtreecommitdiffhomepage
path: root/device/peer.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-10-07 10:17:48 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-14 10:45:31 +0200
commitc8fe925020de61b30eec2bc016fb7f45df78dc6c (patch)
treec39ee4bc7b787de92aa4288a8ba49ddeb4e40578 /device/peer.go
parent0cfa3314ee2740cd94cf7064cc79fdea7b1e0dde (diff)
device: remove global for roaming escape hatch
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/peer.go')
-rw-r--r--device/peer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/peer.go b/device/peer.go
index d13acd9..8cb0dc2 100644
--- a/device/peer.go
+++ b/device/peer.go
@@ -28,6 +28,7 @@ type Peer struct {
device *Device
endpoint conn.Endpoint
persistentKeepaliveInterval uint16
+ disableRoaming bool
// These fields are accessed with atomic operations, which must be
// 64-bit aligned even on 32-bit platforms. Go guarantees that an
@@ -290,10 +291,9 @@ func (peer *Peer) Stop() {
peer.ZeroAndFlushAll()
}
-var RoamingDisabled bool
func (peer *Peer) SetEndpointFromPacket(endpoint conn.Endpoint) {
- if RoamingDisabled {
+ if peer.disableRoaming {
return
}
peer.Lock()