aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-09-15 17:58:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-09-15 17:58:29 +0200
commit6156a7a2e20e6644eccdd27e136d122fab6e6b79 (patch)
tree9a41aee828277a3d8190905ac66bc27e58cbb5e7 /tunnel
parentbuild: bump to wgnt 0.8 (diff)
downloadwireguard-windows-6156a7a2e20e6644eccdd27e136d122fab6e6b79.tar.xz
wireguard-windows-6156a7a2e20e6644eccdd27e136d122fab6e6b79.zip
tunnel: return if unable to configure
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/service.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tunnel/service.go b/tunnel/service.go
index decfb571..9d5631ed 100644
--- a/tunnel/service.go
+++ b/tunnel/service.go
@@ -293,10 +293,12 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest,
err = adapter.SetConfiguration(config.ToDriverConfiguration())
if err != nil {
serviceError = services.ErrorDeviceSetConfig
+ return
}
err = adapter.SetAdapterState(driver.AdapterStateUp)
if err != nil {
serviceError = services.ErrorDeviceBringUp
+ return
}
watcher.Configure(nil, nil, adapter, config, luid)
}