aboutsummaryrefslogtreecommitdiff
path: root/device/mobilequirks.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/mobilequirks.go')
-rw-r--r--device/mobilequirks.go16
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