aboutsummaryrefslogtreecommitdiff
path: root/device/uapi.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@tailscale.com>2019-11-07 11:13:05 -0500
committerDavid Crawshaw <david@zentus.com>2020-03-30 21:05:11 +1100
commitc4a8eab3ddc37021433a4d08075a02b355aca21c (patch)
tree0f2355c17a7cc25c93b85142e5fa635ea487eac2 /device/uapi.go
parent66793239d1fb15e6b3dfe5c7beaa68552d2f5bc5 (diff)
downloadwireguard-go-c4a8eab3ddc37021433a4d08075a02b355aca21c.tar.gz
wireguard-go-c4a8eab3ddc37021433a4d08075a02b355aca21c.zip
conn: new package that splits out the Bind and Endpoint types
The sticky socket code stays in the device package for now, as it reaches deeply into the peer list. This is the first step in an effort to split some code out of the very busy device package. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
Diffstat (limited to 'device/uapi.go')
-rw-r--r--device/uapi.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/device/uapi.go b/device/uapi.go
index 72611ab..6cdccd6 100644
--- a/device/uapi.go
+++ b/device/uapi.go
@@ -15,6 +15,7 @@ import (
"sync/atomic"
"time"
+ "golang.zx2c4.com/wireguard/conn"
"golang.zx2c4.com/wireguard/ipc"
)
@@ -306,7 +307,7 @@ func (device *Device) IpcSetOperation(socket *bufio.Reader) *IPCError {
err := func() error {
peer.Lock()
defer peer.Unlock()
- endpoint, err := CreateEndpoint(value)
+ endpoint, err := conn.CreateEndpoint(value)
if err != nil {
return err
}