Repository navigation
Release v1.5.10 - #358
Merged
Merged
Release v1.5.10#358
Conversation
… ends The netlink library closes the neighbor update channel when the subscription fails, for example with ENOBUFS. The consumer kept reading zero-value updates from the closed channel, burning a CPU core until shutdown without logging anything. Detect the closure, log why the subscription ended, and resubscribe with a backoff of 1s doubling up to 1m. A subscription that cannot be opened is retried the same way, with its own log message. After each resubscription the NDP table is rescanned to pick up neighbors added meanwhile; deletions missed in that window are not recovered. Cancelling now also drains the update channel, so the library's receive goroutine exits.
TestVPNDNSRefreshKeepsLastTailscaleRoutesAndRetries stubs the retry delay to 10ms. On the Windows runner the retry can fire before the test checks the last good routes after the failed read: either it runs right after the failed Refresh, or it lands while that Refresh still holds refreshRunning and is coalesced into a trailing refresh. Both paths read the new route set and drop the old one, so the check sees no route. Gate the retry hook on a channel that the test releases after that check. The real timer, retry bookkeeping and coalescing still run. Production retry delays (5s/15s/60s) are unchanged.
Intercept mode on macOS creates a _ctrld group and exempts its GID from the pf redirect. ctrld took the first free GID from 350, but every Nix installer for macOS (Lix, Determinate, the official installer, nix-darwin) creates its nixbld group at exactly 350 and stops with "GID already exists" when it is taken. The group was never removed, so uninstalling ctrld did not free it either. Pick the GID from 600-699 instead: above Apple's system groups and the first local user, and clear of Nix (350, 30000) and nix-darwin's own service groups (534, 535). On start, an existing group outside the range, or one whose GID another group also uses (locally or in a bound LDAP/Active Directory node, via dscl /Search), moves to a free GID in the range. A shared GID would also exempt the other software's DNS. If the move fails the old GID is kept, so intercept still starts. A good GID is never rewritten, and a directory search that fails or takes over 5s is not treated as a clash. Uninstall now deletes the group.
…ults read The real-defaults run of test-postinstall-provision-failure.sh hard-coded that macOS 'defaults read' prints a raw 0x01 byte as the text \001. That is true on gitlab-runner-arm02 (macOS 26.2) but not on gitlab-runner-arm01 (macOS 27.0.1), which prints the raw byte, so test:pkg-postinstall:macos failed on every arm01 run since 2026-10-27 and passed on arm02, which made the job look flaky. The postinstall contract is only that the preflight lets a non-whitespace control character through and hands ctrld exactly what 'defaults read' printed. In real-defaults mode the case now reads the same fixture plist with the same command and asserts ctrld got that text byte for byte. It logs the macOS version and the bytes so a runner difference is visible. The stubbed mode still pins the \001 text. The postinstall preflight comment claimed control characters could only arrive as escaped text. It now says either form can arrive. Comment only: ctrld still rejects the raw byte as a control character.
…s no reply On macOS, upstream.os binds each query to the stored default-route source. With a full-tunnel VPN that source can stay the physical address while the route to a tunnel-only resolver goes through utun. The query then leaves on the physical interface, no reply comes back, and the #581 retry never runs because it only covers dial/write unreachable errors. Retry route-selected after a read timeout as well, but only when the kernel's route to that server picks a different source than the bound one, so a plain slow LAN resolver is not queried twice. The synthetic 76.76.2.0 fallback stays excluded. After a route-selected retry is answered, later queries to that server skip the bound send until the stored source changes or the route-selected send fails, so only the first query after a network change waits for the timeout. A warning names the server, reason and source once per switch, and an info line marks the switch back.
On Windows `dns` intercept, the first probe of a heal cycle now waits an extra 15 s (nrptProbeLateGrace) after the 2 s timeout. A probe that reaches ctrld in that window proves the NRPT rule routes, so the cycle ends with a warn log and no policy refresh, paramchange, flush or two-phase recovery. A probe that never arrives still follows the existing bounded retries and heal path. On the affected host a forced RefreshPolicyEx holds the DNS Client for ~7 s (median of 118), so each retry made the next probe late and extended the post-boot stall to 1-2.5 min. Health ticks and the retry ladder keep the 2 s probe. The late window honours shutdown through the same revocation poll.
Network-change recovery in intercept mode exempts the new network's nameservers by calling exemptVPNDNSServers with that list only. On macOS the callback rebuilds the whole pf anchor from its argument, so the interface-scoped VPN DNS exemptions were dropped: the Tailscale utun lost its passthrough rules and went back into the tunnel intercept rules. The VPN DNS refresh at the end of recovery did not repair it. It compares the discovered set with the last set that it applied, both were still the Tailscale set, and it logged "exemptions unchanged" and skipped the rewrite. The recovery anchor stayed until the pf watchdog forced a full reload, which rebuilt it from CurrentExemptions. Recovery now writes the current VPN DNS exemptions followed by the recovery nameservers that are not VPN DNS servers. The anchor keeps the VPN interface rules through and after recovery, and the refresh correctly finds nothing to change.
ctrld installs no Network Extension, so any enabled DNS proxy configuration in the macOS Network Extension store belongs to another product. macOS gives that extension the DNS traffic of every process, ctrld's own lookups included. When it sends them on from its own socket, pf's group exemption no longer matches and the lookups come back to ctrld's listener: the self loop in #659. A customer traced their loop to a Cisco Umbrella DNS proxy left enabled after an MDM removal. ctrld already logs that store as ne_configurations, but the proxy is one entry among many. Derive dns_proxies_enabled (app:provider of each enabled dns_proxy) from the same read, add it to the start context and to every self loop report, and warn once at intercept start when it is not empty, so a log shows the likely cause before any lookup fails. No new host read. Product bundle IDs only.
…nt prerequisite Windows only loads a GP-store NRPT key during Group Policy processing. A Dnscache paramchange plus a cache flush does not load a key written straight into the registry (ctrld-qa lab, PARAMCHANGE_NOT_LOADED, 2 of 2). ctrld will not call RefreshPolicyEx for an administrator rule it has not proven, because that re-runs all machine Group Policy. Document that tooling writing the key directly must run its own Group Policy refresh, how ctrld behaves until the rule is loaded, and that gpupdate does not trigger the network-event delayed re-checks.
Use go1.27.4 and staticcheck 2026.2.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor Release
This contains new diagnostics and bug fixes.
Added
DNS self loopreport now carrydns_proxies_enabledwith the app and provider bundle IDs, and ctrld logs one warning at intercept start, before any lookup fails. A Cisco Umbrella DNS proxy left enabled after an MDM removal is a known causeChanged
Fixed
self_loop_ctrldgroup off GIDs other software needs. Intercept mode took the first free GID from 350, which every Nix installer for macOS needs for itsnixbldgroup. The group now gets a GID in 600–699, and an existing group outside that range, or one sharing its GID with another group (locally or in a bound directory), is moved on start. A shared GID would also exempt the other software's DNS from intercept. Uninstall now removes the groupENOBUFS. ctrld now logs why it ended and resubscribes with a backoff from 1 second up to 1 minute, then rescans the neighbor table