github Control-D-Inc/ctrld v1.5.11
Release v1.5.11

one hour ago

Minor Release

This contains version-pinned upgrades and rollback, and bug fixes across intercept mode, reloads and logging.

Added

  • Added --version and --branch to ctrld upgrade, to install a specific release or the latest build of a branch. The downloaded binary must report the requested version before it is installed. The new ctrld rollback command installs an older build the same way: by default the release before the installed one, or the build given by --version or --branch
  • Read UniFi client names from PostgreSQL on UniFi Network 11. Network 11 moved its database from MongoDB, so names set in UniFi stopped reaching Control D, and ctrld clients list no longer listed ubios as a source. When the UniFi Network PostgreSQL socket exists, ctrld reads the names with psql, read-only and with a 10 second deadline. Otherwise it queries MongoDB as before
  • Improved iOS support in the mobile library: StartWithOptions and SetNameservers for the iOS DNS proxy, with no system tools run on iOS and no device DNS changes. Also fixed bad configs, busy listeners and API errors on mobile, so they fail the start with a clear Exit line instead of crashing the app, and fixed state carrying over from one start to the next

Changed

  • Redacted every log line in one step, before it reaches any output: the console, the log_path file, the debug stream and the journal, on every platform. Earlier only the journal and mobile log files were redacted, while the console output that launchd, systemd or init scripts keep on disk was not. ctrld removes URL userinfo, paths, queries and fragments, the resolver ID in *.dns.controld.com hosts, the resolver UID and the provisioning code, in any letter case. The error text in the reply to ctrld log send is redacted too
  • Refused a reload from the Control D API or SIGUSR1 when the new config removes a running listener. A reload does not stop DNS servers, so the dropped listener's server used to keep running with no config. ctrld now keeps the running config and logs which listener is missing. ctrld reload restarts the service instead
  • Rejected listener keys that are not numbers, such as [listener.main] or [listener.01]. Earlier versions started with some of these configs and then crashed. Now a start fails with exit code 59 (UNCLASSIFIED) and names the bad key, a reload of the file keeps the running config, and a Control D custom config with a bad key is not applied. docs/config.md describes how to fix the config file
  • Documented a known issue on Windows in DNS intercept mode: a WireGuard full tunnel connected before ctrld starts blocks DNS to the loopback listener with its kill switch filters, and the start self-check rolls the install back. Start ctrld before connecting, or use split AllowedIPs so the kill switch stays off

Fixed

  • Left adapter DNS that ctrld did not set alone when starting in DNS intercept mode on Windows. Start, ctrld restart and upgrades reset every adapter to DHCP, which cleared the DNS a full-tunnel VPN pushed to its adapter and static DNS an administrator set. ctrld now resets an adapter only when its static DNS still points at a loopback listener left by an earlier interface DNS mode run, or when the adapter's DNS cannot be read
  • Asked Internal Domain resolvers again once a VPN settles on macOS in Intercept mode. A fallback-mode resolver reachable only through the VPN stayed marked down after the VPN connected, in one field log for hours to days, so lookups got the LAN resolver's NXDOMAIN and macOS cached it
  • Capped the negative TTL of an Internal Domain fallback answer at 5 seconds. When the Internal Domain resolvers could not be reached, ctrld passed on the network's own NXDOMAIN with its negative-cache lifetime, often 3600 seconds from the root zone SOA. macOS cached it that long, so the name stayed broken after the VPN came back
  • Served lookups with a public source address on loopback listeners. On a network that gives the Mac a public IPv4 address with no NAT, pf redirects the Mac's own lookups to 127.0.0.1 with their public source, and the WAN-client check refused all of them, including the watchdog's probe, which reloaded pf about every 30 seconds. Listeners on LAN, public or wildcard addresses still refuse WAN clients unless allow_wan_clients is set
  • Stopped repeated mDNS IPv6 probe warnings on interfaces without IPv6, such as bridge member ports with disable_ipv6=1. ctrld now opens IPv6 mDNS sockets only on interfaces with an IPv6 address, and drops sockets that fail permanently instead of warning every 20 to 40 seconds
  • Kept the configuration reload from hanging the desktop stop. A reload that found a deleted device waited for the uninstall, which itself waited for the process to stop, until the service manager killed it. The uninstall now starts without blocking, and the reload's metadata collection no longer holds up a stop
  • Kept REFUSED answers from waiting on the device check. Each REFUSED answer took the device check lock, which is held for the whole API fetch, so answers stalled while a check ran
  • Ended waiting control server handlers when the server stops, so a stopping process no longer answers /started with 200. ctrld upgrade and ctrld restart took that answer to mean the new binary was ready, so an upgrade to a build that never became ready could be reported successful instead of rolled back
  • Fixed data races between the DNS handler and config reload in reading the listener config, the intercept mode and the client ID preference, and a data race in the chassis lookup for host metadata
  • Fixed several crashes: on an upstream or listener key that is not a number, on a config with no listener, in router cleanup, and when a reload drops a running listener's key
  • Fixed a memory leak when ctrld replaces a DoH or DoH3 upstream's transport, for example after a network change. Once a transport had used HTTP/2, the cleanup hook attached to it kept it in memory permanently, so every replacement left the old transport and its connections allocated. ctrld no longer attaches that hook. It closes a replaced transport's idle connections when the transport is retired, and the idle timeout closes the rest

Don't miss a new ctrld release

NewReleases is sending notifications on new releases.