5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-22 19:55:39 +00:00

Fix Windows build

This commit is contained in:
Neil Alexander 2023-05-19 20:34:51 +01:00
parent 7b1635245f
commit 6ac2fae845
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -9,7 +9,7 @@ import (
"log"
"net"
"github.com/yggdrasil-network/yggdrasil-go/src/defaults"
"github.com/yggdrasil-network/yggdrasil-go/src/config"
"golang.org/x/sys/windows"
wgtun "golang.zx2c4.com/wireguard/tun"
@ -22,7 +22,7 @@ import (
// Configures the TUN adapter with the correct IPv6 address and MTU.
func (tun *TunAdapter) setup(ifname string, addr string, mtu uint64) error {
if ifname == "auto" {
ifname = defaults.GetDefaults().DefaultIfName
ifname = config.GetDefaults().DefaultIfName
}
return elevate.DoAsSystem(func() error {
var err error