wgengine/router: do not call ifconfig up if SetRoutesFunc is set

The NetworkExtension brings up the interface itself and does not have
access to `ifconfig`, which the underlying BSD userspace router attempts
to use when Up is called.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
reviewable/pr517/r1
David Crawshaw 4 years ago committed by Brad Fitzpatrick
parent 23e74a0f7a
commit 9258d64261

@ -45,3 +45,10 @@ func (r *darwinRouter) Set(cfg *Config) error {
return r.Router.Set(cfg)
}
func (r *darwinRouter) Up() error {
if SetRoutesFunc != nil {
return nil // bringing up the tunnel is handled externally
}
return r.Router.Up()
}

Loading…
Cancel
Save