summaryrefslogtreecommitdiffhomepage
path: root/main_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-10 00:12:23 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-10 00:12:23 +0100
commit587a2b2a2028430893f14f9ac49e1efa5e3f8509 (patch)
tree85294dc6224347a855f640f3770f1ff0d6a854f0 /main_windows.go
parent6f08a100410fb61093df5321b685b07ff8b801e6 (diff)
device: return error from Up() and Down()
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'main_windows.go')
-rw-r--r--main_windows.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main_windows.go b/main_windows.go
index 10b0c7d..128a0cd 100644
--- a/main_windows.go
+++ b/main_windows.go
@@ -48,7 +48,11 @@ func main() {
}
device := device.NewDevice(tun, logger)
- device.Up()
+ err = device.Up()
+ if err != nil {
+ logger.Errorf("Failed to bring up device: %v", err)
+ os.Exit(ExitSetupFailed)
+ }
logger.Verbosef("Device started")
uapi, err := ipc.UAPIListen(interfaceName)