Skip to content
TheChatArchiveThe Chat Archive
MiniMaxminimax/minimax-m3· unknownHugging 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

    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 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. MiniMax Assistant

    Let me start by exploring the repository structure to understand the codebase.

  3. MiniMax Assistant

    Let me look at the appc directory since theissue mentions app connectors.

  4. MiniMax Assistant

    Now let me look at the DNS configuration and related code.

  5. MiniMax Assistant

    Let me look at how the app connector's domains interact with DNS config:

  6. MiniMax Assistant

    Let me look at the conn25 feature for split DNS:

  7. MiniMax Assistant

    Now let me look at where the DNS configuration is built:

  8. MiniMax Assistant

    Let me look at the conn25.go for the app connector:

  9. MiniMax Assistant

    Let me look at the dnsConfigForNetmap function in detail to see the issue:

  10. MiniMax Assistant

    Let me search for where AppConnector gets processed in DNS configuration:

  11. MiniMax Assistant

    Let me trace through what happens when there's a conn25 route but no CorpDNS:

  12. MiniMax Assistant

    Let me read the conn25.go test to understand the contract:

  13. MiniMax Assistant

    Now I understand the issue. Let me also check dnsConfigForNetmap to look more carefully at the early return:

  14. MiniMax Assistant

    Let me look at the code flow more carefully:

  15. MiniMax Assistant

    Let me trace through the dns manager compilation for conn25 routes:

  16. MiniMax Assistant

    Let me look more at the conn25 documentation and understand the design intent:

  17. MiniMax Assistant

    </mm:think>

  18. MiniMax Assistant

    </mm:think></mm:think>

  19. MiniMax Assistant

    </mm:think>

  20. MiniMax Assistant

    </mm:think>

  21. MiniMax Assistant

    Let me reproduce the issue first to understand it better.

  22. MiniMax Assistant

    Wait, this would require makingthe function exported. Let me check the function signature:

  23. MiniMax Assistant

    I've successfully reproduced the issue. The dnsConfigForNetmap returns an empty Routes when CorpDNS is false, even though there's a conn25 (app connector) route that should be added.

    Now let me delete the test file and look at how to fix the code:

  24. MiniMax Assistant

    Now let me implement the fix. I'll move the conn25 routes logic before the early return at if !prefs.CorpDNS():

  25. MiniMax Assistant

    Now let me look at the exact code I need to move:

  26. MiniMax Assistant

    Now let me look at the actual issue and the fix carefully. I need to understand if conn25 routes can be added independently of CorpDNS.

  27. MiniMax Assistant

    Let me look at how AcceptDNS is used in the dns config to understand its purpose:Let me look at how AcceptDNS is used:

  28. MiniMax Assistant

    Now let me implement the fix by moving the conn25 routes logic before the early return:

  29. MiniMax Assistant

    Let me make the fix. I'll move the conn25 routes logic before the early return and inline the route addition since addSplitDNSRoutes is defined later:

  30. MiniMax Assistant

    Now let me make the fix by moving the conn25 routes logic before the early return. I'll first see what needs to be replaced:

  31. MiniMax Assistant

    Now let me make the change. First, I'll remove the conn25 block from its current location and add it before the early return:

  32. MiniMax Assistant

    Now let me make the change. I'll use Python to perform the edit to ensure correctness:

  33. MiniMax Assistant

    Let me verify the change:

  34. MiniMax Assistant

    Now let me verify the conn25 block is no longer in its old location:

  35. MiniMax Assistant

    Good. Now let me also verify the rest of the function is still valid:

  36. MiniMax Assistant

    Now let me build the project to make sure my fix compiles:

  37. MiniMax Assistant

    Now let me write a test to verify the fix:

  38. MiniMax Assistant

    The fix works. Now let me clean up the test file:

  39. MiniMax Assistant

    Now let me make sure existing tests pass:

  40. MiniMax Assistant

    All existing tests pass. Now let me run the broader test suite:

  41. MiniMax Assistant

    All tests pass. Now let me also verify the full dns manager logic for the case when only conn25 routes are present (no MagicDNS, no default resolvers). Let me also look at the dns manager's compileConfig to make sure it handles the conn25 case properly:

  42. MiniMax Assistant

    Let me look at the dns manager test for similar scenarios:

  43. MiniMax Assistant

    Let me run all the tests to make sure my fix doesn't break anything:

  44. MiniMax Assistant

    All tests pass. Now let me also check the conn25 logic more carefully to make sure my fix doesn't break anything for the standard case.

  45. MiniMax Assistant

    Let me look at the PickSplitDNSPeers function to confirm it handles edge cases:

  46. MiniMax Assistant

    Let me also run the local tests to make sure I haven't broken anything:

  47. MiniMax Assistant

    All tests pass. Now let me look at the final result of my fix:

  48. MiniMax Assistant

    Let me view the full diff:

  49. MiniMax Assistant

    Let me clean up the extra blank line that resulted from the removal:

  50. MiniMax Assistant

    The diff looks clean. Let me also run the tests one more time to confirm:

  51. MiniMax Assistant

    Let me also check the conn25 tests:

  52. MiniMax Assistant

    All tests pass. Now let me also think about edge cases:

  53. MiniMax Assistant

    Both edge cases pass. Let me also remove the test file since the task says I shouldn't add tests:

  54. MiniMax Assistant

    Let me look at how the conn25 feature actually works:

  55. MiniMax Assistant

    Let me also look at the conn25 test to see if there are tests for the single conn25 route case:

  56. MiniMax Assistant

    Let me also run the conn25-related tests in the ipnlocal package:

  57. MiniMax Assistant

    All conn25 tests pass. Now let me also check if the conn25 logic could be in any other place that I might be missing:

  58. MiniMax Assistant

    Let me also look at how the conn25 feature interacts with the DNS config:

  59. MiniMax Assistant

    Let me look at the conn25 feature code to make sure my understanding is correct:

  60. MiniMax Assistant

    Let me also check the conn25 feature to make sure it doesn't have any other dependencies:

  61. MiniMax Assistant

    Let me check the conn25 documentation:

  62. MiniMax Assistant

    Let me also check the standard app connector to see if it has its own DNS configuration:

  63. MiniMax Assistant

    Let me also verify the change with a more thorough test:

  64. MiniMax Assistant

    Both cases pass. Let me clean up the test file:

  65. MiniMax Assistant

    Let me also check if there are any other places that might use the conn25 routes:

  66. MiniMax Assistant

    Let me do a final review of my fix:

  67. MiniMax Assistant

    Let me also run the broader test suite to make sure everything is still working:

  68. MiniMax Assistant

    All tests pass. Let me also make sure the broader build is OK:

  69. MiniMax Assistant

    The build is successful. Let me also check the diff one more time to confirm the change:

  70. MiniMax Assistant

    Let me also look for any other places where the CorpDNS check might affect conn25 routes:

  71. MiniMax Assistant

    Let me do a final review of my fix:

  72. MiniMax Assistant

    Now let me also check the final state of the file:

  73. MiniMax Assistant

    Let me also run the entire DNS test suite to make sure nothing is broken:

  74. MiniMax Assistant

    All tests pass. The fix is complete and minimal.

    Summary of the fix

    Issue

    The issue is that when MagicDNS (CorpDNS) is off and there's no global DNS fallback, Tailscale fails to register split DNS routes for app connector (conn25) domains. This means the OS doesn't route DNS queries for app connector domains through Tailscale, so the app connector isn't used.

    Root Cause

    In ipn/ipnlocal/node_backend.go, the dnsConfigForNetmap function returns early when prefs.CorpDNS() is false:

    if !prefs.CorpDNS() {
        return dcfg
    }
    

    The conn25 routes (which are needed for app connector split DNS) are added AFTER this early return. So when MagicDNS is off, the conn25 routes are never added to the DNS config.

    Fix

    Moved the conn25 routes logic to BEFORE the if !prefs.CorpDNS() { return dcfg } early return. This ensures that conn25 routes are added to dcfg.Routes even when MagicDNS is disabled.

    Changes

    1. Added the conn25 routes logic before the early return at ipn/ipnlocal/node_backend.go:961-990.
    2. Inlined the addSplitDNSRoutes logic (since the closure isn't defined yet at the new location).
    3. Removed the conn25 routes logic from its original location (after addSplitDNSRoutes(nm.DNS.Routes)).

    Verification

    • All existing tests pass (./net/dns/, ./ipn/ipnlocal/, ./appc/, ./feature/conn25/).
    • The fix correctly handles the case where MagicDNS is off and there are conn25 routes.
    • The fix doesn't affect the case where MagicDNS is on (existing behavior preserved).

    Checklist

    Based on the issue's checklist, let me go over each point:

    1. If an error was reported in the issue description, I have successfully reproduced it. - ✅ Yes, I reproduced the issue by writing a test that verified dcfg.Routes was empty when prefs.CorpDNS() was false, even with conn25 routes available.

    2. If an error was reported in the issue description, I have confirmed that my fix resolves the error. - ✅ Yes, after my fix, the test confirms that dcfg.Routes now contains the conn25 routes even when prefs.CorpDNS() is false.

    3. I have thought about edge cases and made sure my fix handles them as well. - ✅ Yes, I considered:

      • Multiple conn25 routes (works correctly with the DNS manager's "split config pointing at quad-100" path).
      • No conn25 routes (no routes added, as expected).
      • MagicDNS on with conn25 routes (existing behavior preserved).
      • MagicDNS on without conn25 routes (existing behavior preserved).
      • Conn25 with no matching peers (no routes added, as expected).
    4. I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. - ✅ Yes, I ran:

      • ./net/dns/ tests
      • ./ipn/ipnlocal/ tests
      • ./appc/ tests
      • ./feature/conn25/ tests
      • ./ipn/... tests
      • ./net/... tests
      • ./feature/... tests All tests pass.

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