wgengine: fail NewUserspaceEngine if wireguard device doesn't come up
Just something I ran across while debugging an unrelated failure. This
is not in response to any bug/issue.
@@ -388,7 +388,9 @@ func NewUserspaceEngine(logf logger.Logf, conf Config) (_ Engine, reterr error)
}()
e.logf("Bringing wireguard device up...")
- e.wgdev.Up()
+ if err := e.wgdev.Up(); err != nil {
+ return nil, fmt.Errorf("wgdev.Up(): %w", err)
+ }
e.logf("Bringing router up...")
if err := e.router.Up(); err != nil {
return nil, err
