diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-06-09 03:02:55 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-06-09 03:02:55 -0600 |
commit | 8da9b1d232b7bb01bf484eaf241da364574f0c5a (patch) | |
tree | b3bc7c5cf6a43949ba395ea67e61d9f8fba1568a /tunnel | |
parent | syntax: skip highlights if too many spans (diff) | |
download | wireguard-windows-8da9b1d232b7bb01bf484eaf241da364574f0c5a.tar.xz wireguard-windows-8da9b1d232b7bb01bf484eaf241da364574f0c5a.zip |
winipcfg: add missing error case to dns domain setting
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r-- | tunnel/winipcfg/luid.go | 4 |
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) |