fix: advisory + exit(1) when port 53 is already in use (#45) #47
Reference in New Issue
Block a user
Delete Branch "fix/port53-diagnostic"
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
AddrInUseon the UDP socket bind and, when the target port is 53, prints a human-readable advisory explaining the likely cause (systemd-resolved on Linux, Dnscache on Windows, generic otherwise) and two concrete fixes — instead of surfacing a raw OS erroris_port_53andport53_conflict_advisoryhelpers insystem_dns.rs;is_systemd_resolved_activemadepubfor Linuxtests/docker/smoke-port53.sh: end-to-end Docker test that pre-binds port 53 with a Python UDP socket and asserts exit code 1 + advisory content (cannot bind to,numa install,bind_addr)Closes #45.
Test plan
make allpasses locally (134 unit tests, clippy clean)./tests/docker/smoke-port53.sh— builds numa insidedebian:bookworm, pre-binds port 53, verifies exit code 1 and all three advisory assertions passsudo numaon a system with systemd-resolved active — should see the advisory instead of a raw error🤖 Generated with Claude Code
Thank you!