From 90759688cab8df77edafde64a6a70ccb8e469034 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Mon, 22 Feb 2021 23:27:33 +0100 Subject: [PATCH] Send StableID --- machine.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/machine.go b/machine.go index 3b6ebb4f..7c72498b 100644 --- a/machine.go +++ b/machine.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "sort" + "strconv" "time" "github.com/jinzhu/gorm/dialects/postgres" @@ -81,7 +82,8 @@ func (m Machine) toNode() (*tailcfg.Node, error) { } n := tailcfg.Node{ - ID: tailcfg.NodeID(m.ID), // this is the actual ID + ID: tailcfg.NodeID(m.ID), // this is the actual ID + StableID: tailcfg.StableNodeID(strconv.FormatUint(m.ID, 10)), // in headscale, unlike tailcontrol server, IDs are permantent Name: "", User: 1, Key: tailcfg.NodeKey(nKey),