From 4c3289aa52415a02f2d3d4e3c51983c61ff49c02 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 11 Feb 2021 16:00:28 +0100 Subject: [PATCH] tunnel: bump all tools Signed-off-by: Jason A. Donenfeld --- tunnel/tools/libwg-go/api-android.go | 12 ++++++++++-- tunnel/tools/libwg-go/go.mod | 2 +- tunnel/tools/libwg-go/go.sum | 4 ++-- tunnel/tools/wireguard-tools | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tunnel/tools/libwg-go/api-android.go b/tunnel/tools/libwg-go/api-android.go index aaca0b74..5fce4705 100644 --- a/tunnel/tools/libwg-go/api-android.go +++ b/tunnel/tools/libwg-go/api-android.go @@ -119,7 +119,13 @@ func wgTurnOn(interfaceName string, tunFd int32, settings string) int32 { } } - device.Up() + err = device.Up() + if err != nil { + logger.Errorf("Unable to bring up device: %v", err) + uapiFile.Close() + device.Close() + return -1 + } logger.Verbosef("Device started") var i int32 @@ -129,7 +135,9 @@ func wgTurnOn(interfaceName string, tunFd int32, settings string) int32 { } } if i == math.MaxInt32 { - unix.Close(int(tunFd)) + logger.Errorf("Unable to find empty handle") + uapiFile.Close() + device.Close() return -1 } tunnelHandles[i] = TunnelHandle{device: device, uapi: uapi} diff --git a/tunnel/tools/libwg-go/go.mod b/tunnel/tools/libwg-go/go.mod index 8fffa9a7..8422b2bc 100644 --- a/tunnel/tools/libwg-go/go.mod +++ b/tunnel/tools/libwg-go/go.mod @@ -5,5 +5,5 @@ go 1.15 require ( golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c - golang.zx2c4.com/wireguard v0.0.20201119-0.20210126220548-d669c78c4306 + golang.zx2c4.com/wireguard v0.0.0-20210211144856-ef8115f63b22 ) diff --git a/tunnel/tools/libwg-go/go.sum b/tunnel/tools/libwg-go/go.sum index 3bcb54df..391f9d6f 100644 --- a/tunnel/tools/libwg-go/go.sum +++ b/tunnel/tools/libwg-go/go.sum @@ -18,5 +18,5 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.zx2c4.com/wireguard v0.0.20201119-0.20210126220548-d669c78c4306 h1:z7W9tlhU/KwkZWSX6QCfZXBcDpIa1JYANldQ/gFJj44= -golang.zx2c4.com/wireguard v0.0.20201119-0.20210126220548-d669c78c4306/go.mod h1:r0ExowOoGFfDoLDxx+M9SYbNVsoZ0xviLL+K4f2mt+A= +golang.zx2c4.com/wireguard v0.0.0-20210211144856-ef8115f63b22 h1:7Ct1Jps4o4u2hBFWrg8Rt65VmXfMPTeR0OSXxdq8gMk= +golang.zx2c4.com/wireguard v0.0.0-20210211144856-ef8115f63b22/go.mod h1:r0ExowOoGFfDoLDxx+M9SYbNVsoZ0xviLL+K4f2mt+A= diff --git a/tunnel/tools/wireguard-tools b/tunnel/tools/wireguard-tools index 265e81a3..e8fa0f66 160000 --- a/tunnel/tools/wireguard-tools +++ b/tunnel/tools/wireguard-tools @@ -1 +1 @@ -Subproject commit 265e81a344defb05bd7d420d125cde169b8995af +Subproject commit e8fa0f662f2541952e745d9c7fff0eeaec538a5c