aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-06 15:44:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-07 11:31:53 +0200
commit14dfc4e3e1925fcc3d303100c44ef4c321427c6b (patch)
treedd1e16a34fafff9635381e21e99c65421ed5cbf4 /tunnel
parenttunnel: perform full stop on shutdown (diff)
downloadwireguard-windows-14dfc4e3e1925fcc3d303100c44ef4c321427c6b.tar.xz
wireguard-windows-14dfc4e3e1925fcc3d303100c44ef4c321427c6b.zip
global: cleanup TODO comment spacing
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/defaultroutemonitor.go2
-rw-r--r--tunnel/firewall/blocker.go2
-rw-r--r--tunnel/firewall/syscall_windows.go2
-rw-r--r--tunnel/ifaceconfig.go4
-rw-r--r--tunnel/service.go2
5 files changed, 6 insertions, 6 deletions
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)