Skip to content
TheChatArchiveThe Chat Archive
DeepSeekdeepseek/deepseek-v4-pro· deepseekHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION No split dns registered with the OS with an app connector. What is the…

  1. 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 using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to 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-$

  2. DeepSeek Assistant

    Let me understand the issue:

    1. It's about Tailscale on Linux with systemd-resolved
    2. When MagicDNS is turned off and there's no global DNS fallback, but there's an app connector, Tailscale fails to register split DNS with the OS to route DNS requests to the app connector.

    So the problem is: when you have an app connector configured (which provides split DNS for certain domains), but MagicDNS is off and there's no global DNS fallback, the split DNS routes for the app connector should still be registered with systemd-resolved, but they're not.

    Let me explore the repository to understand the codebase structure and find relevant code.

  3. DeepSeek Assistant

    Let me explore the relevant DNS-related code and app connector code

  4. DeepSeek Assistant

    Let me look at the key files:

  5. DeepSeek Assistant

    Let me do one command at a time.

  6. DeepSeek Assistant

    Now let me look at the resolved.go file and how DNS configuration is set up for systemd-resolved.

  7. DeepSeek Assistant

    Let me look at the DNS manager and the OSConfig, and how the app connector interacts with DNS.

  8. DeepSeek Assistant

    Let me see the full compileConfig function and the OSConfig type:

  9. DeepSeek Assistant

    Let me look at the Config type and its methods:

  10. DeepSeek Assistant

    Let me look at the config.go file more carefully.

  11. DeepSeek Assistant

    Let me look at the app connector code to understand how it sets up DNS routes

  12. DeepSeek Assistant

    Let me look at how the DNS config is built and where app connector routes are converted to DNS routes

  13. DeepSeek Assistant

    Let me look at the dnsconfig_test.go to understand how app connector DNS config is built

  14. DeepSeek Assistant

    Let me find and look at the dnsConfigForNetmap function

  15. DeepSeek Assistant

    Let me look at the dnsConfigForNetmap function

  16. DeepSeek Assistant

    Let me check what CorpDNS means and how prefs relate to MagicDNS

  17. DeepSeek Assistant

    Let me read the full dnsConfigForNetmap function to understand the ordering

  18. DeepSeek Assistant

    Let me understand the relationship between CorpDNS and MagicDNS and how these prefs are set

  19. DeepSeek Assistant

    Let me look at the prefs.go to understand CorpDNS better.

  20. DeepSeek Assistant

    Now let me look at the exact location of the conn25 code and the early return to understand the fix

  21. DeepSeek Assistant

    Now let me see the conn25 code that comes after:

  22. DeepSeek Assistant

    Let me understand the relationship between CorpDNS and MagicDNS to better understand the issue

  23. DeepSeek Assistant

    Let me look at the test file for DNS config to understand the expected behavior better

  24. DeepSeek Assistant

    Let me look at the conn25 file to understand the split DNS mechanism

  25. DeepSeek Assistant

    Let me first create a reproduction script to understand the behavior and confirm the issue

  26. DeepSeek Assistant

    Let me check the Go environment setup.

  27. DeepSeek Assistant

    GOPATH and GOMODCACHE are empty, which means the module cache doesn't exist. Let me try setting them up.

  28. DeepSeek Assistant

    Let me set up the full Go environment

  29. DeepSeek Assistant

    Let me now look at compileConfig more carefully to see if there are additional issues when only DoH routes exist

  30. DeepSeek Assistant

    Let me check where peerAPIBase is defined

  31. DeepSeek Assistant

    peerAPIBase might be defined elsewhere. Let me search for it.

  32. DeepSeek Assistant

    Now let me plan and implement the fix. Let me first see the exact lines:

  33. DeepSeek Assistant

    Now I understand the issue. The conn25 split DNS routes are added after the !prefs.CorpDNS() early return check, so when CorpDNS is false (MagicDNS off, no accept-dns), the app connector DNS routes are never added to the config. The fix is to move the conn25 code before this check.

    Let me implement the fix

  34. DeepSeek Assistant

    Let me use the open command properly.

  35. DeepSeek Assistant

    Now I'll make the fix. I need to move the addSplitDNSRoutes function definition and the conn25 DNS routes code before the !prefs.CorpDNS() check. Let me do this with an edit.

  36. DeepSeek Assistant

    Now I need to remove the duplicate addSplitDNSRoutes definition and the old conn25 code. Let me see the current state.

  37. DeepSeek Assistant

    Let me remove the duplicate addSplitDNSRoutes definition (lines 1020-1034) and the old conn25 code (lines 1070-1086

  38. DeepSeek Assistant

    Now let me remove the duplicate conn25 code at lines 1054-107

  39. DeepSeek Assistant

    Let me verify the final state of the function around the changes

  40. DeepSeek Assistant

    Good, the code looks correct. Now let me run the tests to make sure everything passes.

  41. DeepSeek Assistant

    All tests pass. Let me also run the broader DNS and app connector tests.

  42. DeepSeek Assistant

    Let me also run the appc tests.

  43. DeepSeek Assistant

    Now let me also check if there's a secondary issue in compileConfig: when conn25 routes use DoH URLs, toIPsOnly returns empty and the split DNS config is invalid. Let me look at that path

  44. DeepSeek Assistant

    I can see there's also a secondary issue. When conn25 routes use DoH URLs, toIPsOnly returns empty, causing an invalid DNS configuration. Let me fix this too by checking the result of toIPsOnly before taking the split DNS shortcut

  45. DeepSeek Assistant

    Now let me run the tests again to make sure both changes are

  46. DeepSeek Assistant

    I accidentally removed the variable definitions. Let me fix this

  47. DeepSeek Assistant

    Let me add the isApple

  48. DeepSeek Assistant

    I see that the if statement got corrupted. Let me fix it.

  49. DeepSeek Assistant

    Now let me run the tests again.

  50. DeepSeek Assistant

    All tests pass. Let me run more comprehensive tests.

  51. DeepSeek Assistant

    Let me check the diff to ensure my changes are

  52. DeepSeek Assistant

    The diff looks clean. Let me run one more round of tests to make sure everything is solid

  53. DeepSeek Assistant

    All tests pass. Let me now write a quick verification script to confirm the fix handles the described scenario.

  54. DeepSeek Assistant

    Let me clean up and run a final comprehensive test

  55. DeepSeek Assistant

    The full build passes. Let me run go vet on the changed

  56. DeepSeek Assistant

    Let me do a final review of the changes before submitting.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.