mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-16 13:17:19 +02:00
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:
committed by
Cuong Manh Le
parent
7f3d332b64
commit
c43739e42d
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user