summaryrefslogtreecommitdiffhomepage
path: root/device/uapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/uapi.go')
-rw-r--r--device/uapi.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/device/uapi.go b/device/uapi.go
index bf38459..c1ddb38 100644
--- a/device/uapi.go
+++ b/device/uapi.go
@@ -121,6 +121,9 @@ func (device *Device) IpcGetOperation(w io.Writer) error {
// IpcSetOperation implements the WireGuard configuration protocol "set" operation.
// See https://www.wireguard.com/xplatform/#configuration-protocol for details.
func (device *Device) IpcSetOperation(r io.Reader) (err error) {
+ device.ipcSetMu.Lock()
+ defer device.ipcSetMu.Unlock()
+
defer func() {
if err != nil {
device.log.Error.Println(err)