fix(darwin): probe interception after the host wakes

Rule text survives a suspend unchanged, so the watchdog reports the pf
anchor intact while nothing translates, and the probe monitor is only
armed by interface changes with a schedule frozen through the sleep.
Detect the resume from the wall-clock gap and probe from there, with a
bounded repair: at most two forced reloads across the retry schedule.

Refresh the OS resolver before every probe - the probe aims at the first
OS nameserver and passes when it has none, so a pre-sleep list makes it
meaningless. Stand down for stabilization, which verifies on completion.
This commit is contained in:
Cuong Manh Le committed 2026-09-28 16:40:49 +07:00
1 parent 3fa03d92d6
commit ca27f60bc4
5 files changed
+972 -28

No files matched your search

+6
View File
@@ -250,6 +250,12 @@ type prog struct {
pfDelayedRecheckMu sync.Mutex //lint:ignore U1000 used on darwin
pfDelayedRecheckTimers []*time.Timer //lint:ignore U1000 used on darwin
// pfSettleFollowupTimer is the pending post-settle VPN DNS refresh, if any.
// Tracked so teardown can cancel it and a later stabilization replaces it
// instead of stacking another copy of the same refresh. Protected by
// pfDelayedRecheckMu.
pfSettleFollowupTimer *time.Timer //lint:ignore U1000 used on darwin
// pfIgnoredChangeLastReconcile bounds immediate pf/VPN-DNS work for noisy
// ignored macOS network deltas. Tunnel changes bypass this limit, and the
// existing delayed checks provide a trailing reconciliation after churn.