mirror of
https://github.com/tailscale/tailscale.git
synced 2026-03-29 11:42:02 -04:00
When tailscaled gets started with userspace networking, it won't modify your system's network configuration. For this, it creates a noopManager for DNS management. noopManager correctly observes that there's no real OS DNS to send queries to. This leads to we completely dropping any DNS internal resolution from `dns query` This change alters this so that even without a base config we'll still allow the internal resolver to handle internal DNS queries Fixes #18354 Signed-off-by: Fernando Serboncini <fserb@tailscale.com>
23 lines
577 B
Go
23 lines
577 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package dns
|
|
|
|
type noopManager struct{}
|
|
|
|
func (m noopManager) SetDNS(OSConfig) error { return nil }
|
|
func (m noopManager) SupportsSplitDNS() bool { return false }
|
|
func (m noopManager) Close() error { return nil }
|
|
func (m noopManager) GetBaseConfig() (OSConfig, error) {
|
|
return OSConfig{}, ErrGetBaseConfigNotSupported
|
|
}
|
|
|
|
func NewNoopManager() (noopManager, error) {
|
|
return noopManager{}, nil
|
|
}
|
|
|
|
func isNoopManager(c OSConfigurator) bool {
|
|
_, ok := c.(noopManager)
|
|
return ok
|
|
}
|