aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-05 13:09:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-05 13:09:20 +0200
commit108c37a05639a5fdbef2112a046ed7d7b1f2c27a (patch)
treeaa51e81b783cb139ab544e3743c965ce4ed2e795
parenttun: windows: obsolete 256 packets per exchange buffer limitation (diff)
downloadwireguard-go-108c37a05639a5fdbef2112a046ed7d7b1f2c27a.tar.xz
wireguard-go-108c37a05639a5fdbef2112a046ed7d7b1f2c27a.zip
wintun: don't run HrRenameConnection in separate thread
It's very slow, but unfortunately we haven't a choice. NLA needs this to have completed.
-rw-r--r--tun/wintun/wintun_windows.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 6daa4d7..f962f6e 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -528,11 +528,10 @@ func (wintun *Wintun) InterfaceName() (string, error) {
//
func (wintun *Wintun) SetInterfaceName(ifname string) error {
// We have to tell the various runtime COM services about the new name too. We ignore the
- // error because netshell isn't available on servercore. It's also slow, so we run it in a
- // separate thread.
+ // error because netshell isn't available on servercore.
// TODO: netsh.exe falls back to NciSetConnection in this case. If somebody complains, maybe
// we should do the same.
- go netshell.HrRenameConnection(&wintun.cfgInstanceID, windows.StringToUTF16Ptr(ifname))
+ netshell.HrRenameConnection(&wintun.cfgInstanceID, windows.StringToUTF16Ptr(ifname))
// Set the interface name. The above line should have done this too, but in case it failed, we force it.
key, err := registry.OpenKey(registry.LOCAL_MACHINE, wintun.netRegKeyName(), registry.SET_VALUE)