|
@@ -59,6 +59,7 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
|
|
ifaceDelta := ncutils.IfaceDelta(&nodeCfg.Node, &newNode)
|
|
ifaceDelta := ncutils.IfaceDelta(&nodeCfg.Node, &newNode)
|
|
shouldDNSChange := nodeCfg.Node.DNSOn != newNode.DNSOn
|
|
shouldDNSChange := nodeCfg.Node.DNSOn != newNode.DNSOn
|
|
hubChange := nodeCfg.Node.IsHub != newNode.IsHub
|
|
hubChange := nodeCfg.Node.IsHub != newNode.IsHub
|
|
|
|
+ keepaliveChange := nodeCfg.Node.PersistentKeepalive != newNode.PersistentKeepalive
|
|
|
|
|
|
nodeCfg.Node = newNode
|
|
nodeCfg.Node = newNode
|
|
switch newNode.Action {
|
|
switch newNode.Action {
|
|
@@ -107,6 +108,9 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
|
|
ncutils.Log("error updating wireguard config " + err.Error())
|
|
ncutils.Log("error updating wireguard config " + err.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if keepaliveChange {
|
|
|
|
+ wireguard.UpdateKeepAlive(file, newNode.PersistentKeepalive)
|
|
|
|
+ }
|
|
if ifaceDelta { // if a change caused an ifacedelta we need to notify the server to update the peers
|
|
if ifaceDelta { // if a change caused an ifacedelta we need to notify the server to update the peers
|
|
ncutils.Log("applying WG conf to " + file)
|
|
ncutils.Log("applying WG conf to " + file)
|
|
if ncutils.IsWindows() {
|
|
if ncutils.IsWindows() {
|