diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-07 10:17:48 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-14 10:45:31 +0200 |
commit | c8fe925020de61b30eec2bc016fb7f45df78dc6c (patch) | |
tree | c39ee4bc7b787de92aa4288a8ba49ddeb4e40578 /device/mobilequirks.go | |
parent | 0cfa3314ee2740cd94cf7064cc79fdea7b1e0dde (diff) |
device: remove global for roaming escape hatch
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/mobilequirks.go')
-rw-r--r-- | device/mobilequirks.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/device/mobilequirks.go b/device/mobilequirks.go new file mode 100644 index 0000000..fc0b386 --- /dev/null +++ b/device/mobilequirks.go @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2020 WireGuard LLC. All Rights Reserved. + */ + +package device + +func (device *Device) DisableSomeRoamingForBrokenMobileSemantics() { + device.peers.RLock() + for _, peer := range device.peers.keyMap { + peer.Lock() + defer peer.Unlock() + peer.disableRoaming = peer.endpoint != nil + } + device.peers.RUnlock() +}
\ No newline at end of file |