mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-19 22:28:35 +00:00
cmd/tailscaled,ipn/ipnlocal,wgengine/...: pass dns.Manager into netstack
Needed for a following commit which moves magicDNS handling into netstack. Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
@@ -142,11 +142,11 @@ type userspaceEngine struct {
|
||||
|
||||
// InternalsGetter is implemented by Engines that can export their internals.
|
||||
type InternalsGetter interface {
|
||||
GetInternals() (_ *tstun.Wrapper, _ *magicsock.Conn, ok bool)
|
||||
GetInternals() (_ *tstun.Wrapper, _ *magicsock.Conn, _ *dns.Manager, ok bool)
|
||||
}
|
||||
|
||||
func (e *userspaceEngine) GetInternals() (_ *tstun.Wrapper, _ *magicsock.Conn, ok bool) {
|
||||
return e.tundev, e.magicConn, true
|
||||
func (e *userspaceEngine) GetInternals() (_ *tstun.Wrapper, _ *magicsock.Conn, _ *dns.Manager, ok bool) {
|
||||
return e.tundev, e.magicConn, e.dns, true
|
||||
}
|
||||
|
||||
// ResolvingEngine is implemented by Engines that have DNS resolvers.
|
||||
@@ -244,7 +244,7 @@ func IsNetstack(e Engine) bool {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
tw, _, ok := ig.GetInternals()
|
||||
tw, _, _, ok := ig.GetInternals()
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user