From 968d13148fe6b9b1e1876eee4afcd16c11ad722b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Wed, 6 May 2020 15:54:34 +0200 Subject: [PATCH] pkg/mesh: update persistent keepalive on change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, when udpdating the persistent keepalive of a node via annotations, the node's WireGuard configuration was not updated. This corrects the behavior. Fixes: #54 Signed-off-by: Lucas Servén Marín --- pkg/mesh/mesh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mesh/mesh.go b/pkg/mesh/mesh.go index 929e1dc..39133f5 100644 --- a/pkg/mesh/mesh.go +++ b/pkg/mesh/mesh.go @@ -787,7 +787,7 @@ func nodesAreEqual(a, b *Node) bool { // Ignore LastSeen when comparing equality we want to check if the nodes are // equivalent. However, we do want to check if LastSeen has transitioned // between valid and invalid. - return string(a.Key) == string(b.Key) && ipNetsEqual(a.WireGuardIP, b.WireGuardIP) && ipNetsEqual(a.InternalIP, b.InternalIP) && a.Leader == b.Leader && a.Location == b.Location && a.Name == b.Name && subnetsEqual(a.Subnet, b.Subnet) && a.Ready() == b.Ready() + return string(a.Key) == string(b.Key) && ipNetsEqual(a.WireGuardIP, b.WireGuardIP) && ipNetsEqual(a.InternalIP, b.InternalIP) && a.Leader == b.Leader && a.Location == b.Location && a.Name == b.Name && subnetsEqual(a.Subnet, b.Subnet) && a.Ready() == b.Ready() && a.PersistentKeepalive == b.PersistentKeepalive } func peersAreEqual(a, b *Peer) bool {