mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-04-20 00:36:37 +02:00
e6677b39a4
When port 53 is taken (e.g. by mDNSResponder), ctrld failed with 'could not find available listen ip and port' instead of falling back to port 5354. Root cause: tryUpdateListenerConfig() checked the dnsIntercept bool, which is derived in prog.run() AFTER listener config is resolved. Fix: check interceptMode string directly (CLI flag + config fallback) in a new tryUpdateListenerConfigIntercept() that tries 127.0.0.1:53 then 127.0.0.1:5354. Also updates buildPFAnchorRules() to use the actual listener IP/port from config instead of hardcoded 127.0.0.1:53, so pf rules redirect to wherever ctrld is actually listening.