wgengine: fix nil pointer deref crash from earlier change

Fixes #45
pull/49/head
Brad Fitzpatrick 5 years ago
parent a631466587
commit c773abde77

@ -183,7 +183,7 @@ func NewUserspaceEngineAdvanced(logf logger.Logf, tuntap tun.Device, routerGen R
e.wgdev.Close() e.wgdev.Close()
return nil, err return nil, err
} }
if err := e.router.SetRoutes(RouteSettings{}); err != nil { if err := e.router.SetRoutes(RouteSettings{Cfg: new(wgcfg.Config)}); err != nil {
e.wgdev.Close() e.wgdev.Close()
return nil, err return nil, err
} }

Loading…
Cancel
Save