summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-01-25 09:35:35 -0800
committerJosh Bleecher Snyder <josh@tailscale.com>2021-01-25 09:38:09 -0800
commitcecb41515d780213fd6b37bd04686f5296edf84c (patch)
treef4ac4a6f0f1566025aa9e246245ba2a16aa281d8 /device/device.go
parenta9ce4b762cd8b9898ff69571194ad3f09ad6d7bd (diff)
device: serialize access to IpcSetOperation
Interleaves IpcSetOperations would spell trouble. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/device/device.go b/device/device.go
index 58e996f..5d11766 100644
--- a/device/device.go
+++ b/device/device.go
@@ -23,6 +23,7 @@ type Device struct {
isUp AtomicBool // device is (going) up
isClosed AtomicBool // device is closed? (acting as guard)
log *Logger
+ ipcSetMu sync.Mutex // serializes UAPI set operations
// synchronized resources (locks acquired in order)