tunnel: bump all tools

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-02-11 16:00:28 +01:00
parent 79376bca64
commit 4c3289aa52
4 changed files with 14 additions and 6 deletions

View File

@ -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") logger.Verbosef("Device started")
var i int32 var i int32
@ -129,7 +135,9 @@ func wgTurnOn(interfaceName string, tunFd int32, settings string) int32 {
} }
} }
if i == math.MaxInt32 { if i == math.MaxInt32 {
unix.Close(int(tunFd)) logger.Errorf("Unable to find empty handle")
uapiFile.Close()
device.Close()
return -1 return -1
} }
tunnelHandles[i] = TunnelHandle{device: device, uapi: uapi} tunnelHandles[i] = TunnelHandle{device: device, uapi: uapi}

View File

@ -5,5 +5,5 @@ go 1.15
require ( require (
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c 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
) )

View File

@ -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.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.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.0-20210211144856-ef8115f63b22 h1:7Ct1Jps4o4u2hBFWrg8Rt65VmXfMPTeR0OSXxdq8gMk=
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/go.mod h1:r0ExowOoGFfDoLDxx+M9SYbNVsoZ0xviLL+K4f2mt+A=

@ -1 +1 @@
Subproject commit 265e81a344defb05bd7d420d125cde169b8995af Subproject commit e8fa0f662f2541952e745d9c7fff0eeaec538a5c