diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-10 00:12:23 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-02-10 00:12:23 +0100 |
commit | 587a2b2a2028430893f14f9ac49e1efa5e3f8509 (patch) | |
tree | 85294dc6224347a855f640f3770f1ff0d6a854f0 /main_windows.go | |
parent | 6f08a100410fb61093df5321b685b07ff8b801e6 (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.go | 6 |
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) |