mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-21 17:21:18 -08:00
Updates tailscale/corp#49775 Track authoritative NXDOMAINs for at least 60 seconds on macOS and iOS (where our short SOA ttls are not properly respected), and flush when a cached name becomes resolvable. Compile a no-op tracker elsewhere and avoid duplicate VPN reconfiguration on link changes.
22 lines
608 B
Go
22 lines
608 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build !darwin && !ios
|
|
|
|
package resolver
|
|
|
|
import "tailscale.com/util/dnsname"
|
|
|
|
// negativeCache is a no-op on platforms without NXDOMAIN tracking.
|
|
type negativeCache struct{}
|
|
|
|
func (*negativeCache) queryGeneration() uint64 { return 0 }
|
|
|
|
func (*negativeCache) record(dnsname.FQDN, uint64) bool { return true }
|
|
|
|
// ClearNegativeCache is a no-op on this platform.
|
|
func (*Resolver) ClearNegativeCache() {}
|
|
|
|
// CheckCachedDNS always returns false on this platform.
|
|
func (*Resolver) CheckCachedDNS() bool { return false }
|