remove nameserver from call to CreateWireGuardConf

This commit is contained in:
Matthew R Kasun 2022-01-06 09:13:49 -05:00
parent a6429c883c
commit 781de684a0

View file

@ -13,7 +13,6 @@ import (
"github.com/gravitl/netmaker/logger" "github.com/gravitl/netmaker/logger"
"github.com/gravitl/netmaker/models" "github.com/gravitl/netmaker/models"
"github.com/gravitl/netmaker/netclient/ncutils" "github.com/gravitl/netmaker/netclient/ncutils"
"github.com/gravitl/netmaker/servercfg"
"golang.zx2c4.com/wireguard/wgctrl" "golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes" "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
) )
@ -87,7 +86,7 @@ func initWireguard(node *models.Node, privkey string, peers []wgtypes.PeerConfig
if !ncutils.IsKernel() { if !ncutils.IsKernel() {
var newConf string var newConf string
newConf, _ = ncutils.CreateWireGuardConf(node, key.String(), strconv.FormatInt(int64(node.ListenPort), 10), servercfg.GetCoreDNSAddr(), peers) newConf, _ = ncutils.CreateWireGuardConf(node, key.String(), strconv.FormatInt(int64(node.ListenPort), 10), peers)
confPath := ncutils.GetNetclientPathSpecific() + ifacename + ".conf" confPath := ncutils.GetNetclientPathSpecific() + ifacename + ".conf"
logger.Log(1, "writing wg conf file to:", confPath) logger.Log(1, "writing wg conf file to:", confPath)
err = ioutil.WriteFile(confPath, []byte(newConf), 0644) err = ioutil.WriteFile(confPath, []byte(newConf), 0644)