From 7c11f71ac53f83c813859a9cae3ae7bf8a273bcb Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 23 Sep 2020 14:01:00 -0700 Subject: [PATCH] wgengine/router: ignore errors deleting 169.254.255.255/32 route on Windows Updates #785 --- wgengine/router/ifconfig_windows.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wgengine/router/ifconfig_windows.go b/wgengine/router/ifconfig_windows.go index 36f7ba9cc..66386059c 100644 --- a/wgengine/router/ifconfig_windows.go +++ b/wgengine/router/ifconfig_windows.go @@ -611,14 +611,20 @@ func syncRoutes(ifc *winipcfg.Interface, want []*winipcfg.RouteData) error { for _, a := range del { err := ifc.DeleteRoute(&a.Destination, &a.NextHop) if err != nil { - errs = append(errs, fmt.Errorf("deleting route %v: %w", a.Destination, err)) + dstStr := a.Destination.String() + if dstStr == "169.254.255.255/32" { + // Issue 785. Ignore these routes + // failing to delete. Harmless. + continue + } + errs = append(errs, fmt.Errorf("deleting route %v: %w", dstStr, err)) } } for _, a := range add { err := ifc.AddRoute(a) if err != nil { - errs = append(errs, fmt.Errorf("adding route %v: %w", a.Destination, err)) + errs = append(errs, fmt.Errorf("adding route %v: %w", &a.Destination, err)) } }