summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver/controlhttpserver.go
diff options
context:
space:
mode:
authorAaron Klotz <aaron@tailscale.com>2025-01-13 13:47:56 -0700
committerAaron Klotz <aaron@tailscale.com>2025-01-14 16:37:35 -0500
commitd818a58a7772698358a078684d57b27098b28dad (patch)
treea5907bb486755c13634fd410febc4b7aad6640be /control/controlhttp/controlhttpserver/controlhttpserver.go
parent27477983e333eda4cab540778d97fe64203c91ac (diff)
downloadtailscale-d818a58a7772698358a078684d57b27098b28dad.tar.xz
tailscale-d818a58a7772698358a078684d57b27098b28dad.zip
net/dns: ensure the Windows configurator does not touch the hosts file unless the configuration actually changed
We build up maps of both the existing MagicDNS configuration in hosts and the desired MagicDNS configuration, compare the two, and only write out a new one if there are changes. The comparison doesn't need to be perfect, as the occasional false-positive is fine, but this should greatly reduce rewrites of the hosts file. I also changed the hosts updating code to remove the CRLF/LF conversion stuff, and use Fprintf instead of Frintln to let us write those inline. Updates #14428 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver/controlhttpserver.go')
0 files changed, 0 insertions, 0 deletions