From 22c462bd910e862c6ddb84b28ae3a75d3f233a52 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 9 Oct 2020 09:04:23 -0700 Subject: [PATCH] wgengine/monitor: fix copy/paste-o to actually monitor route changes Due to a copy/paste-o, we were monitoring address changes twice, and not monitoring route changes at all. Verified with 'tailscale debug --monitor' that this actually works now (while running 'route add 10.3.0.0 mask 255.255.0.0 10.0.0.1' and 'route delete (same)' back and forth in cmd.exe) In practice route changes are accompanied by address changes and this doesn't fix any known issues. I just noticed this while reading this code again. But at least the code does what it was trying to do now. --- wgengine/monitor/monitor_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgengine/monitor/monitor_windows.go b/wgengine/monitor/monitor_windows.go index ac1bbdc1f..254577910 100644 --- a/wgengine/monitor/monitor_windows.go +++ b/wgengine/monitor/monitor_windows.go @@ -195,7 +195,7 @@ func notifyAddrChange(h *windows.Handle, o *windows.Overlapped) error { } func notifyRouteChange(h *windows.Handle, o *windows.Overlapped) error { - return callNotifyProc(notifyAddrChangeProc, h, o) + return callNotifyProc(notifyRouteChangeProc, h, o) } func callNotifyProc(p *syscall.LazyProc, h *windows.Handle, o *windows.Overlapped) error {