net/tstun: merge in wgengine/tstun.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-03-26 22:14:08 -07:00
committed by Dave Anderson
parent 018200aeba
commit 588b70f468
11 changed files with 9 additions and 11 deletions

View File

@ -32,7 +32,7 @@ import (
"tailscale.com/ipn/ipnserver"
"tailscale.com/logpolicy"
"tailscale.com/net/socks5"
ntun "tailscale.com/net/tstun"
"tailscale.com/net/tstun"
"tailscale.com/paths"
"tailscale.com/types/flagtype"
"tailscale.com/types/logger"
@ -44,7 +44,6 @@ import (
"tailscale.com/wgengine/monitor"
"tailscale.com/wgengine/netstack"
"tailscale.com/wgengine/router"
"tailscale.com/wgengine/tstun"
)
// globalStateKey is the ipn.StateKey that tailscaled loads on
@ -337,9 +336,9 @@ func tryEngine(logf logger.Logf, linkMon *monitor.Mon, name string) (e wgengine.
conf.TUN = tstun.NewFakeTUN()
conf.Router = router.NewFake(logf)
} else {
dev, err := ntun.New(logf, name)
dev, err := tstun.New(logf, name)
if err != nil {
ntun.Diagnose(logf, name)
tstun.Diagnose(logf, name)
return nil, false, err
}
conf.TUN = dev