From 6f9a7593646c6af0d4f19af2f669ce28b6e30cab Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 6 Jun 2019 15:44:29 +0200 Subject: global: cleanup TODO comment spacing Signed-off-by: Jason A. Donenfeld --- tunnel/defaultroutemonitor.go | 2 +- tunnel/firewall/blocker.go | 2 +- tunnel/firewall/syscall_windows.go | 2 +- tunnel/ifaceconfig.go | 4 ++-- tunnel/service.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tunnel') diff --git a/tunnel/defaultroutemonitor.go b/tunnel/defaultroutemonitor.go index e1692bc9..e9440710 100644 --- a/tunnel/defaultroutemonitor.go +++ b/tunnel/defaultroutemonitor.go @@ -104,7 +104,7 @@ func monitorDefaultRoutes(device *device.Device, autoMTU bool, tun *tun.NativeTu if err != nil { return err } - tun.ForceMTU(int(iface.NLMTU)) //TODO: it sort of breaks the model with v6 mtu and v4 mtu being different. Just set v4 one for now. + tun.ForceMTU(int(iface.NLMTU)) // TODO: it sort of breaks the model with v6 mtu and v4 mtu being different. Just set v4 one for now. iface, err = ourLUID.IPInterface(windows.AF_INET6) if err == nil { // People seem to like to disable IPv6, so we make this non-fatal. iface.NLMTU = mtu - 80 diff --git a/tunnel/firewall/blocker.go b/tunnel/firewall/blocker.go index e02fd05f..605b47bf 100644 --- a/tunnel/firewall/blocker.go +++ b/tunnel/firewall/blocker.go @@ -73,7 +73,7 @@ func registerBaseObjects(session uintptr) (*baseObjects, error) { } err = fwpmProviderAdd0(session, &provider, 0) if err != nil { - //TODO: cleanup entire call chain of these if failure? + // TODO: cleanup entire call chain of these if failure? return nil, wrapErr(err) } } diff --git a/tunnel/firewall/syscall_windows.go b/tunnel/firewall/syscall_windows.go index 0f247d85..195137ad 100644 --- a/tunnel/firewall/syscall_windows.go +++ b/tunnel/firewall/syscall_windows.go @@ -35,7 +35,7 @@ package firewall // https://docs.microsoft.com/en-us/windows/desktop/api/fwpmu/nf-fwpmu-fwpmprovideradd0 //sys fwpmProviderAdd0(engineHandle uintptr, provider *wtFwpmProvider0, sd uintptr) (err error) [failretval!=0] = fwpuclnt.FwpmProviderAdd0 -//TODO: Add these to x/sys/windows: +// TODO: Add these to x/sys/windows: // https://docs.microsoft.com/en-us/windows/desktop/api/securitybaseapi/nf-securitybaseapi-getsididentifierauthority //sys getSidIdentifierAuthority(sid *windows.SID) (authority *windows.SidIdentifierAuthority) = advapi32.GetSidIdentifierAuthority diff --git a/tunnel/ifaceconfig.go b/tunnel/ifaceconfig.go index 2cc90e79..a71b612e 100644 --- a/tunnel/ifaceconfig.go +++ b/tunnel/ifaceconfig.go @@ -25,7 +25,7 @@ func cleanupAddressesOnDisconnectedInterfaces(addresses []net.IPNet) { return } includedInAddresses := func(a net.IPNet) bool { - //TODO: this makes the whole algorithm O(n^2). But we can't stick net.IPNet in a Go hashmap. Bummer! + // TODO: this makes the whole algorithm O(n^2). But we can't stick net.IPNet in a Go hashmap. Bummer! for _, addr := range addresses { ip := addr.IP if ip4 := ip.To4(); ip4 != nil { @@ -226,7 +226,7 @@ func enableFirewall(conf *conf.Config, tun *tun.NativeTun) error { } func waitForFamilies(tun *tun.NativeTun) { - //TODO: This whole thing is a disgusting hack that shouldn't be neccessary. + // TODO: This whole thing is a disgusting hack that shouldn't be neccessary. f := func(luid winipcfg.LUID, family winipcfg.AddressFamily, maxRetries int) { for i := 0; i < maxRetries; i++ { diff --git a/tunnel/service.go b/tunnel/service.go index 5c1cc13e..97ffb551 100644 --- a/tunnel/service.go +++ b/tunnel/service.go @@ -184,7 +184,7 @@ func (service *Service) Execute(args []string, r <-chan svc.ChangeRequest, chang dev.Up() log.Println("Waiting for TCP/IP to attach to interface") - waitForFamilies(nativeTun) //TODO: move this sort of thing into tun/wintun/CreateInterface + waitForFamilies(nativeTun) // TODO: move this sort of thing into tun/wintun/CreateInterface log.Println("Monitoring default routes") routeChangeCallback, err = monitorDefaultRoutes(dev, conf.Interface.MTU == 0, nativeTun) -- cgit v1.2.3-59-g8ed1b