Merge pull request #10 from tailscale/b1956

backend: Send DNS config through CallbackRouter.
bradfitz/1.9
Denton Gentry 4 years ago committed by GitHub
commit 0489079771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -87,16 +87,14 @@ func newBackend(dataDir string, jvm *jni.JVM, store *stateStore, settings settin
logID.UnmarshalText([]byte(storedLogID)) logID.UnmarshalText([]byte(storedLogID))
} }
b.SetupLogs(dataDir, logID) b.SetupLogs(dataDir, logID)
d, err := dns.NewNoopManager() cb := &router.CallbackRouter{
if err != nil { SetBoth: b.setCfg,
return nil, err SplitDNS: false, // TODO: https://github.com/tailscale/tailscale/issues/1695
} }
engine, err := wgengine.NewUserspaceEngine(logf, wgengine.Config{ engine, err := wgengine.NewUserspaceEngine(logf, wgengine.Config{
Tun: b.devices, Tun: b.devices,
Router: &router.CallbackRouter{ Router: cb,
SetBoth: b.setCfg, DNS: cb,
},
DNS: d,
}) })
if err != nil { if err != nil {
return nil, fmt.Errorf("runBackend: NewUserspaceEngineAdvanced: %v", err) return nil, fmt.Errorf("runBackend: NewUserspaceEngineAdvanced: %v", err)

Loading…
Cancel
Save