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
Interface
No new interfaces are introduced.
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 start by exploring the repository structure and searching for DNS-related code, especially around split DNS and app connectors.
- Assistant
Let me search for DNS configuration and app connector related code.
- Assistant
I'll inspect how DNS configuration decides to register with the OS, focusing on split DNS and app connectors.
- Assistant
Let me look at how DNS config is built - particularly related to app connectors and when OS DNS is configured.
- Assistant
There's a dnsconfig related test. Let me look at the dnsConfigForNetmap function and the relevant test cases about app connectors.
- Assistant
Let me find the dnsConfigForNetmap function definition.
- Assistant
Found it in node_backend.go. Let me read that function and also the OS DNS setup logic.
- Assistant
Let me continue reading the rest of dnsConfigForNetmap.
- Assistant
Let me continue reading and also look at how manager decides to configure OS DNS.
- Assistant
Let me inspect the app connector split DNS peer selection and compileConfig logic more carefully.
- Assistant
Let me continue reading compileConfig - especially the part about app connectors.
- Assistant
Let me check recent git history and the app-connector DNS tests for clues.
- Assistant
Let me look at git log for DNS-related commits that might relate to this bug, and also look at resolved.go for systemd-resolved.
- Assistant
Let me search for relevant issues/comments and inspect how AcceptDNS interacts with OS registration.
- Assistant
Let me look at how resolved handles split DNS and also check if there's something about empty MatchDomains issus. Also let me look at when Control plane sends routes for app connectors.
- Assistant
Let me look more carefully. When MagicDNS is off and there's split DNS from app connectors:
- Assistant
Let me look at manager_test.go for test cases that might relate to this, and also PickSplitDNSPeers.
- Assistant
Let me look at the manager test for "routes-split" which seems to match this scenario.
- Assistant
Looking at routes-split - when all routes go to same resolver and split is supported, OS gets MatchDomains. That should work. I think the core issue is in how the client registers split DNS with the OS when using an app connector.
- Assistant
Let me look for PRs or recent changes about this specific bug.
- Assistant
Let me look at the SetDNS path more carefully and whether empty OSConfig is applied. Also maybe looking at health checks or DNS status.
- Assistant
Let me read the Manager.Set method and how OS config is applied.
- Assistant
Let me look at singleResolverSet and toIPsOnly more carefully - HTTP/DoH resolvers may be the problem.
- Assistant
I think I found the bug. When split DNS routes only use HTTP/DoH peer API resolvers (app connectors),
singleResolverSet()is non-empty buttoIPsOnlystrips them, leaving empty nameservers. Verifying with tests. - Assistant
Let me search for tests covering split DNS routes that use only DoH URLs.
- Assistant
I'll reproduce the bug with a small test script, then apply a fix.
- Assistant
I'll temporarily add a failing test case to reproduce the bug, then fix it.
- Assistant
I'll add a temporary failing test case and run it to confirm the bug.
- Assistant
I accidentally duplicated a closing brace — fixing that now.
- Assistant
Good. Now let me run the specific test to reproduce.
- Assistant
Need to set up the Go environment.
- Assistant
There's a custom go toolchain in tool/. Let me check how to run tests properly.
- Assistant
Need to set HOME.
- Assistant
Good, now run the test.
- Assistant
Confirmed the bug. Checking how IPPort handles bare IPs, then applying the fix.
- Assistant
Applying the fix to
compileConfigso we only hand resolvers to the OS when they're plain IPs. - Assistant
I'll apply the fix now.
- Assistant
There's a subtle issue: MagicDNS routes with empty resolvers are forums stripped into LocalDomains before singleResolverSet is called - wait, no:
- Assistant
All manager tests pass. Removing the temporary test I added, per the instructions.
- Assistant
I accidentally edited the wrong file — restoring
manager.goand cleaning up the test file. - Assistant
I lost the fix on
manager.go— reapplying it and removing the test. - Assistant
Restored
manager.goto its original state. Re-applying the fix carefully. - Assistant
Verifying the fix with a temporary external test and running the suite.
- Assistant
Existing tests pass. I'll carefully re-add a temporary test to double-check the fix, then remove it.
- Assistant
The fix works. Removing the temporary test and running the full net/dns suite.
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
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.5-35B-A3BCompare side by side →
minimax/minimax-m3Compare side by side →
- x-ai/grok-4.5Compare side by side →
- x-ai/grok-4.5Compare side by side →
- x-ai/grok-4.5Compare side by side →
z-ai/glm-5.2Compare side by side →
claude-fable-5Compare side by side →
claude-fable-5Compare side by side →