Fix DNS failure on network change #9
Reference in New Issue
Block a user
Delete Branch "fix/upstream-redetect"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
discover_system_dns()and swaps upstream atomically when auto-detectedscutil --dnsonly shows127.0.0.1(numa install active), reads DHCP-provided DNS fromipconfig getpacket en0/en1before falling back to Quad9Bug
Numa detected the upstream DNS server and LAN IP once at startup. Switching Wi-Fi networks caused:
Fixed by: network watcher + DHCP DNS detection fallback chain:
scutil --dns→ipconfig getpacket(DHCP DNS) →9.9.9.9(Quad9)Tested live on a network that blocks all public DNS but allows ISP DNS.
Test plan
make allpasses (fmt, clippy, audit, build)make deploy, DNS resolves on restrictive network via ISP DNSnuma install+ restart → detects DHCP DNS instead of loopbackdocs/testing/network-change-tests.md🤖 Generated with Claude Code