fix: restore v1 intercept parity on master

Restore the previously merged macOS VPN DNS post-settle refresh,
unchanged-exemption suppression, forced pf state flush, and self-upgrade
test after they were removed by the firewall-mode merge.

Also keep Windows NRPT pointed at loopback when the listener is configured
on a wildcard address.
This commit is contained in:
Dev Scribe
2026-07-15 12:28:08 -04:00
committed by Cuong Manh Le
parent 7f3d332b64
commit c43739e42d
9 changed files with 265 additions and 10 deletions
+4 -1
View File
@@ -683,8 +683,11 @@ func (p *prog) startDNSIntercept() error {
// server, ctrld may have fallen back to 127.0.0.x:53 instead of 127.0.0.1:53.
// NRPT must point to whichever address ctrld is actually listening on.
listenerIP := "127.0.0.1"
if lc := p.cfg.FirstListener(); lc != nil && lc.IP != "" {
if lc := p.cfg.FirstListener(); lc != nil && lc.IP != "" && lc.IP != "0.0.0.0" && lc.IP != "::" {
listenerIP = lc.IP
} else if lc != nil && (lc.IP == "0.0.0.0" || lc.IP == "::") {
mainLog.Load().Warn().Str("configured_ip", lc.IP).
Msg("DNS intercept: listener configured with wildcard IP, using 127.0.0.1 for NRPT rules")
}
state := &wfpState{