mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
Merge pull request #880 from gravitl/feature_0.12.0_host_dns
don't update dns on comms network peer update
This commit is contained in:
commit
f53b9a68e4
1 changed files with 5 additions and 2 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"time"
|
||||
|
||||
mqtt "github.com/eclipse/paho.mqtt.golang"
|
||||
"github.com/gravitl/netmaker/logger"
|
||||
"github.com/gravitl/netmaker/models"
|
||||
"github.com/gravitl/netmaker/netclient/config"
|
||||
"github.com/gravitl/netmaker/netclient/local"
|
||||
|
@ -197,7 +196,11 @@ func UpdatePeers(client mqtt.Client, msg mqtt.Message) {
|
|||
ncutils.Log("error syncing wg after peer update: " + err.Error())
|
||||
return
|
||||
}
|
||||
logger.Log(0, "DNS updating /etc/hosts")
|
||||
//skip dns updates if this is a peer update for comms network
|
||||
if cfg.Node.NetworkSettings.IsComms == "yes" {
|
||||
return
|
||||
}
|
||||
ncutils.Log("DNS updating /etc/hosts")
|
||||
if cfg.Node.DNSOn == "yes" {
|
||||
if err := setHostDNS(peerUpdate.DNS, ncutils.IsWindows()); err != nil {
|
||||
ncutils.Log("error updating /etc/hosts " + err.Error())
|
||||
|
|
Loading…
Reference in a new issue