Skip to content

Commit 9075968

Browse files
committed
Send StableID
1 parent a20fffc commit 9075968

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

machine.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"log"
77
"sort"
8+
"strconv"
89
"time"
910

1011
"github.com/jinzhu/gorm/dialects/postgres"
@@ -81,7 +82,8 @@ func (m Machine) toNode() (*tailcfg.Node, error) {
8182
}
8283

8384
n := tailcfg.Node{
84-
ID: tailcfg.NodeID(m.ID), // this is the actual ID
85+
ID: tailcfg.NodeID(m.ID), // this is the actual ID
86+
StableID: tailcfg.StableNodeID(strconv.FormatUint(m.ID, 10)), // in headscale, unlike tailcontrol server, IDs are permantent
8587
Name: "",
8688
User: 1,
8789
Key: tailcfg.NodeKey(nKey),

0 commit comments

Comments
 (0)