aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-06-09 03:02:55 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-06-09 03:02:55 -0600
commit8da9b1d232b7bb01bf484eaf241da364574f0c5a (patch)
treeb3bc7c5cf6a43949ba395ea67e61d9f8fba1568a /tunnel
parentsyntax: skip highlights if too many spans (diff)
downloadwireguard-windows-master.tar.xz
wireguard-windows-master.zip
winipcfg: add missing error case to dns domain settingHEADmaster
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/winipcfg/luid.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tunnel/winipcfg/luid.go b/tunnel/winipcfg/luid.go
index e1aafb61..8f5ba61b 100644
--- a/tunnel/winipcfg/luid.go
+++ b/tunnel/winipcfg/luid.go
@@ -432,7 +432,9 @@ func (luid LUID) SetDNSForFamily(family AddressFamily, dnses []net.IP) error {
// SetDNSDomain method sets the interface-specific DNS domain.
func (luid LUID) SetDNSDomain(domain string) error {
guid, err := luid.GUID()
-
+ if err != nil {
+ return fmt.Errorf("Error converting luid to guid: %v", err)
+ }
key, err := registry.OpenKey(registry.LOCAL_MACHINE, fmt.Sprintf("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Adapters\\%v", guid), registry.QUERY_VALUE)
if err != nil {
return fmt.Errorf("Error opening adapter-specific TCP/IP network registry key: %v", err)