fix: validate pf state before stabilization

This commit is contained in:
Dev Scribe
2026-08-21 14:45:56 +07:00
committed by Cuong Manh Le
parent 246c1b9691
commit 779fe015f0
15 changed files with 2036 additions and 488 deletions
+8 -2
View File
@@ -1526,8 +1526,8 @@ func parseIPv4AsUint32(ipStr string) uint32 {
}
// ensurePFAnchorActive is a no-op on Windows (WFP handles intercept differently).
func (p *prog) ensurePFAnchorActive() bool {
return false
func (p *prog) ensurePFAnchorActive() pfAnchorCheckResult {
return pfAnchorCheckSkipped
}
// checkTunnelInterfaceChanges is a no-op on Windows (WFP handles intercept differently).
@@ -1535,6 +1535,12 @@ func (p *prog) checkTunnelInterfaceChanges() bool {
return false
}
// Windows preserves the existing immediate reconciliation behavior. NRPT/WFP
// and adapter DNS settling have different lifecycle requirements from macOS pf.
func (p *prog) dnsInterceptIgnoredChangeReconcileDue(time.Time) bool {
return true
}
// pfAnchorRecheckDelay is the delay for deferred pf anchor re-checks.
// Defined here as a stub for Windows (referenced from dns_proxy.go).
const pfAnchorRecheckDelay = 2 * time.Second