From 9de17e6c9c90f3bf3ec3eb709a92c9e1295a6d67 Mon Sep 17 00:00:00 2001 From: Mathias Hall-Andersen Date: Sun, 18 Feb 2018 20:49:03 +0100 Subject: Seperated fwmark update code into function --- uapi.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'uapi.go') diff --git a/uapi.go b/uapi.go index caaa498..01cdab6 100644 --- a/uapi.go +++ b/uapi.go @@ -191,11 +191,7 @@ func ipcSetOperation(device *Device, socket *bufio.ReadWriter) *IPCError { logDebug.Println("UAPI: Updating fwmark") - device.net.mutex.Lock() - device.net.fwmark = uint32(fwmark) - device.net.mutex.Unlock() - - if err := device.BindUpdate(); err != nil { + if err := device.BindSetMark(uint32(fwmark)); err != nil { logError.Println("Failed to update fwmark:", err) return &IPCError{Code: ipcErrorPortInUse} } -- cgit v1.2.3-59-g8ed1b