ISSUE DESCRIPTION No split dns registered with the OS with an app connector. What is the…
- User
ISSUE DESCRIPTION
No split dns registered with the OS with an app connector.
What is the issue?
It's possible to have an app connector but tailscale fails to register split dns with the OS to route dns requests to it.
Steps to reproduce
Linux w/ systemd-resolved Turn off MagicDNS No global dns fallback results in Tailscale not being used for DNS by the operating system
Are there any recent changes that introduced the issue?
No response
OS
No response
OS version
No response
Tailscale version
No response
Other software
No response
Bug report
No response
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /tailscale, current file: none) bash-$
- Assistant
I’ll trace how DNS configuration is derived for app connectors, identify why an empty global resolver/MagicDNS-disabled setup is treated as no DNS, then make the smallest source fix and run focused tests. First I’ll inspect the repository status and search for app-connector and split-DNS configuration paths.
- Assistant
The broad search confirms this is the Tailscale Go tree. I’ll narrow to the local backend’s network-map DNS translation and the resolver-manager logic that decides whether systemd-resolved receives split routes.
- Assistant
The relevant path is
node_backend.go: it adds ordinary control-plane split routes, then Connector Gen 2.5 routes that point at connector peers. I’ll inspect that function and its focused tests to see where an empty resolver list gets discarded. - Assistant
The generated
dns.Configdoes contain connector routes, but registration can still fail later during manager compilation. I’ll finish reading the connector cases and then inspectdns.Manager.compileConfig, especially branches keyed on default resolvers and split DNS. - Assistant
The connector test exactly matches the reported setup: one DoH split route, no defaults, MagicDNS off. So the bug is downstream. The previous output omitted the start of
compileConfig; I’ll read it in full and inspect manager tests around pure split-DNS and DoH/custom resolvers. - Assistant
The defect is now clear: the native split-DNS fast path accepts any common resolver set, then converts it with
toIPsOnly. App connectors use HTTP peer-API DoH URLs, so conversion yields zero nameservers while match domains remain, and systemd-resolved cannot route those queries to Tailscale. Such routes must instead point the OS at Tailscale’s local resolver, which can forward DoH. I’ll confirm existing fixture expectations and related helper semantics before changing the condition. - Assistant
The native optimization is valid only when every resolver can be represented as a plain port-53 IP in
OSConfig. I’ll cache the common resolver set, require lossless conversion before taking that path, and otherwise retain the routes in the internal resolver while registering Tailscale’s service IP plus match domains with systemd-resolved. This also correctly handles custom-port resolvers, not just connector DoH URLs. - Assistant
The change is localized and formats cleanly. I’ll run the entire
net/dnspackage test suite; this exercises compilation across split-capable/non-split, Linux/Apple/Windows, MagicDNS, multi-route, and resolver-forwarding configurations. - Assistant
The test command did not reach compilation because this environment has both
GOMODCACHEandGOPATHunset. I’ll supply a temporary GOPATH (without changing repository files) and rerun the same suite. - Assistant
Dependencies downloaded successfully, but Go also requires an explicit build cache because
HOMEis unset. I’ll set both temporary cache paths and rerun. - Assistant
All DNS tests pass. To verify the exact behavior without adding or modifying tests, I’ll inspect whether an existing table case already covers a single custom/DoH split resolver on Linux; if not, I’ll use the package’s existing test binary/test selection only and validate the resulting logic through the focused compilation path and diff.
- Assistant
There is no existing Linux case with a single DoH split route (the custom-route case is iOS), but the corrected branch is unambiguous: URL conversion is empty, so it now falls through to the proxy path, which sets
rcfg.Routes, Tailscale service nameservers, andMatchDomains. I’ll also run the focused ipnlocal DNS-config test and the full ipnlocal package, since that is where app-connector routes originate. - Assistant
Both the exact connector config test and the complete ipnlocal suite pass. I’ll perform a final diff/status review to ensure only the intended source file changed and no temporary artifacts or test modifications are present.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- xiaomi/mimo-v2.5-proCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →
- gpt-5.6-lunaCompare side by side →
deepseek/deepseek-v4-proCompare side by side →
deepseek/deepseek-v4-proCompare side by side →