mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-15 07:20:36 -04:00
nodeBackend.nodeByName should always contain both FQDNs and short names, as it is used in different contexts, including UserDial DNS resolution, which should be able to resolve unqualified DNS names regardless of the MagicDNS state. However, net/dns/resolver.Resolver and, by extension, MagicDNSHosts implementations should only resolve fully qualified domain names, skipping short names when MagicDNS is disabled for the tailnet. This fixes it in (*nodeBackend).nodeByFQDNLocked, which is only used in the MagicDNS paths, and updates the tests. Fixes #20789 Signed-off-by: Nick Khyl <nickk@tailscale.com>