diff --git a/wgengine/router/ifconfig_windows.go b/wgengine/router/ifconfig_windows.go index 784c6a476..60f78bfa6 100644 --- a/wgengine/router/ifconfig_windows.go +++ b/wgengine/router/ifconfig_windows.go @@ -70,7 +70,7 @@ func bindSocketRoute(family winipcfg.AddressFamily, device *device.Device, ourLu return bind.BindSocketToInterface6(index, false) } } else { - log.Printf("WARNING: skipping windows socket binding.\n") + log.Printf("WARNING: skipping windows socket binding.") } return nil } @@ -194,10 +194,10 @@ func setFirewall(ifcGUID *windows.GUID) (bool, error) { return false, fmt.Errorf("nco.GetAdapterId: %v", err) } if aid != ifcGUID.String() { - log.Printf("skipping adapter id: %v\n", aid) + log.Printf("skipping adapter id: %v", aid) continue } - log.Printf("found! adapter id: %v\n", aid) + log.Printf("found! adapter id: %v", aid) n, err := nco.GetNetwork() if err != nil { @@ -216,7 +216,7 @@ func setFirewall(ifcGUID *windows.GUID) (bool, error) { return false, fmt.Errorf("SetCategory: %v", err) } } else { - log.Printf("setFirewall: already category %v\n", cat) + log.Printf("setFirewall: already category %v", cat) } return true, nil @@ -228,7 +228,7 @@ func setFirewall(ifcGUID *windows.GUID) (bool, error) { func configureInterface(cfg *Config, tun *tun.NativeTun) error { const mtu = 0 guid := tun.GUID() - log.Printf("wintun GUID is %v\n", guid) + log.Printf("wintun GUID is %v", guid) iface, err := winipcfg.InterfaceFromGUID(&guid) if err != nil { return err @@ -241,7 +241,7 @@ func configureInterface(cfg *Config, tun *tun.NativeTun) error { for i := 0; i < 20; i++ { found, err := setFirewall(&guid) if err != nil { - log.Printf("setFirewall: %v\n", err) + log.Printf("setFirewall: %v", err) // fall through anyway, this isn't fatal. } if found { @@ -328,21 +328,21 @@ func configureInterface(cfg *Config, tun *tun.NativeTun) error { } deduplicatedRoutes = append(deduplicatedRoutes, &routes[i]) } - log.Printf("routes: %v\n", routes) + log.Printf("routes: %v", routes) var errAcc error err = iface.SyncRoutes(deduplicatedRoutes) if err != nil && errAcc == nil { - log.Printf("setroutes: %v\n", err) + log.Printf("setroutes: %v", err) errAcc = err } ipif, err := iface.GetIpInterface(winipcfg.AF_INET) if err != nil { - log.Printf("getipif: %v\n", err) + log.Printf("getipif: %v", err) return err } - log.Printf("foundDefault4: %v\n", foundDefault4) + log.Printf("foundDefault4: %v", foundDefault4) if foundDefault4 { ipif.UseAutomaticMetric = false ipif.Metric = 0 diff --git a/wgengine/router/router_openbsd.go b/wgengine/router/router_openbsd.go index 334f89a29..05c06a70a 100644 --- a/wgengine/router/router_openbsd.go +++ b/wgengine/router/router_openbsd.go @@ -50,7 +50,7 @@ func newUserspaceRouter(logf logger.Logf, _ *device.Device, tundev tun.Device) ( func cmd(args ...string) *exec.Cmd { if len(args) == 0 { - log.Fatalf("exec.Cmd(%#v) invalid; need argv[0]\n", args) + log.Fatalf("exec.Cmd(%#v) invalid; need argv[0]", args) } return exec.Command(args[0], args[1:]...) } diff --git a/wgengine/router/router_userspace_bsd.go b/wgengine/router/router_userspace_bsd.go index b177a34a9..30fc8e7cb 100644 --- a/wgengine/router/router_userspace_bsd.go +++ b/wgengine/router/router_userspace_bsd.go @@ -49,7 +49,7 @@ func newUserspaceBSDRouter(logf logger.Logf, _ *device.Device, tundev tun.Device func cmd(args ...string) *exec.Cmd { if len(args) == 0 { - log.Fatalf("exec.Cmd(%#v) invalid; need argv[0]\n", args) + log.Fatalf("exec.Cmd(%#v) invalid; need argv[0]", args) } return exec.Command(args[0], args[1:]...) } diff --git a/wgengine/router/router_windows.go b/wgengine/router/router_windows.go index 60652297c..d8a51832d 100644 --- a/wgengine/router/router_windows.go +++ b/wgengine/router/router_windows.go @@ -52,7 +52,7 @@ func (r *winRouter) Up() error { var err error r.routeChangeCallback, err = monitorDefaultRoutes(r.wgdev, true, r.nativeTun) if err != nil { - log.Fatalf("MonitorDefaultRoutes: %v\n", err) + log.Fatalf("MonitorDefaultRoutes: %v", err) } return nil } @@ -64,7 +64,7 @@ func (r *winRouter) Set(cfg *Config) error { err := configureInterface(cfg, r.nativeTun) if err != nil { - r.logf("ConfigureInterface: %v\n", err) + r.logf("ConfigureInterface: %v", err) return err }