pkg/mesh: ensure persistent-keepalive set on nodes
A bug identified by @carlosrmendes caused nodes to ignore the persistent-keepalive annotation. xref: https://github.com/squat/kilo/issues/53#issuecomment-620945927 Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit is contained in:
parent
bc4e564c85
commit
e4829832c5
@ -478,15 +478,16 @@ func (m *Mesh) handleLocal(n *Node) {
|
|||||||
// Take leader, location, and subnet from the argument, as these
|
// Take leader, location, and subnet from the argument, as these
|
||||||
// are not determined by kilo.
|
// are not determined by kilo.
|
||||||
local := &Node{
|
local := &Node{
|
||||||
Endpoint: n.Endpoint,
|
Endpoint: n.Endpoint,
|
||||||
Key: m.pub,
|
Key: m.pub,
|
||||||
InternalIP: n.InternalIP,
|
InternalIP: n.InternalIP,
|
||||||
LastSeen: time.Now().Unix(),
|
LastSeen: time.Now().Unix(),
|
||||||
Leader: n.Leader,
|
Leader: n.Leader,
|
||||||
Location: n.Location,
|
Location: n.Location,
|
||||||
Name: m.hostname,
|
Name: m.hostname,
|
||||||
Subnet: n.Subnet,
|
PersistentKeepalive: n.PersistentKeepalive,
|
||||||
WireGuardIP: m.wireGuardIP,
|
Subnet: n.Subnet,
|
||||||
|
WireGuardIP: m.wireGuardIP,
|
||||||
}
|
}
|
||||||
if !nodesAreEqual(n, local) {
|
if !nodesAreEqual(n, local) {
|
||||||
level.Debug(m.logger).Log("msg", "local node differs from backend")
|
level.Debug(m.logger).Log("msg", "local node differs from backend")
|
||||||
|
Loading…
Reference in New Issue
Block a user