From 119101962c9e2867b97809dd6252479a1fffea1a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 6 Nov 2020 11:42:34 -0800 Subject: [PATCH] wgengine/router: don't double-prefix dns log messages [Windows] --- wgengine/router/dns/config.go | 3 ++- wgengine/router/router_windows.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wgengine/router/dns/config.go b/wgengine/router/dns/config.go index 64d3a2972..6a5c6cfad 100644 --- a/wgengine/router/dns/config.go +++ b/wgengine/router/dns/config.go @@ -63,7 +63,8 @@ func (lhs Config) Equal(rhs Config) bool { // ManagerConfig is the set of parameters from which // a manager implementation is chosen and initialized. type ManagerConfig struct { - // logf is the logger for the manager to use. + // Logf is the logger for the manager to use. + // It is wrapped with a "dns: " prefix. Logf logger.Logf // InterfaceNAme is the name of the interface with which DNS settings should be associated. InterfaceName string diff --git a/wgengine/router/router_windows.go b/wgengine/router/router_windows.go index b2f3d97c9..50e65dd32 100644 --- a/wgengine/router/router_windows.go +++ b/wgengine/router/router_windows.go @@ -39,7 +39,7 @@ func newUserspaceRouter(logf logger.Logf, wgdev *device.Device, tundev tun.Devic nativeTun := tundev.(*tun.NativeTun) guid := nativeTun.GUID().String() mconfig := dns.ManagerConfig{ - Logf: logger.WithPrefix(logf, "dns: "), + Logf: logf, InterfaceName: guid, }