cmd/tailscaled: fix typo in netstack variable name

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
pull/6628/head
Mihai Parparita 2 years ago committed by Mihai Parparita
parent 3f16dec1bb
commit cb525a1aad

@ -584,15 +584,15 @@ func handleSubnetsInNetstack() bool {
var tstunNew = tstun.New var tstunNew = tstun.New
func tryEngine(logf logger.Logf, linkMon *monitor.Mon, dialer *tsdial.Dialer, name string) (e wgengine.Engine, onlyNetsack bool, err error) { func tryEngine(logf logger.Logf, linkMon *monitor.Mon, dialer *tsdial.Dialer, name string) (e wgengine.Engine, onlyNetstack bool, err error) {
conf := wgengine.Config{ conf := wgengine.Config{
ListenPort: args.port, ListenPort: args.port,
LinkMonitor: linkMon, LinkMonitor: linkMon,
Dialer: dialer, Dialer: dialer,
} }
onlyNetsack = name == "userspace-networking" onlyNetstack = name == "userspace-networking"
netns.SetEnabled(!onlyNetsack) netns.SetEnabled(!onlyNetstack)
if args.birdSocketPath != "" && createBIRDClient != nil { if args.birdSocketPath != "" && createBIRDClient != nil {
log.Printf("Connecting to BIRD at %s ...", args.birdSocketPath) log.Printf("Connecting to BIRD at %s ...", args.birdSocketPath)
@ -601,7 +601,7 @@ func tryEngine(logf logger.Logf, linkMon *monitor.Mon, dialer *tsdial.Dialer, na
return nil, false, fmt.Errorf("createBIRDClient: %w", err) return nil, false, fmt.Errorf("createBIRDClient: %w", err)
} }
} }
if onlyNetsack { if onlyNetstack {
if runtime.GOOS == "linux" && distro.Get() == distro.Synology { if runtime.GOOS == "linux" && distro.Get() == distro.Synology {
// On Synology in netstack mode, still init a DNS // On Synology in netstack mode, still init a DNS
// manager (directManager) to avoid the health check // manager (directManager) to avoid the health check
@ -646,9 +646,9 @@ func tryEngine(logf logger.Logf, linkMon *monitor.Mon, dialer *tsdial.Dialer, na
} }
e, err = wgengine.NewUserspaceEngine(logf, conf) e, err = wgengine.NewUserspaceEngine(logf, conf)
if err != nil { if err != nil {
return nil, onlyNetsack, err return nil, onlyNetstack, err
} }
return e, onlyNetsack, nil return e, onlyNetstack, nil
} }
func newDebugMux() *http.ServeMux { func newDebugMux() *http.ServeMux {

Loading…
Cancel
Save