1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-10-17 20:05:55 +02:00

Switch to using nodeKey instead of machineKey for expired machines registration

Signed-off-by: Laurent Marchaud <laurent@marchaud.com>
This commit is contained in:
Laurent Marchaud 2022-08-19 15:48:35 +02:00
parent fca33aacbe
commit e85562268d
No known key found for this signature in database
GPG Key ID: FAD4D3279AE317C5
2 changed files with 2 additions and 2 deletions

2
api.go
View File

@ -348,7 +348,7 @@ func (h *Headscale) RegistrationHandler(
machine.Expiry = &time.Time{}
h.registrationCache.Set(
machineKeyStr,
NodePublicKeyStripPrefix(registerRequest.NodeKey),
*machine,
registerCacheExpiration,
)

View File

@ -803,7 +803,7 @@ func (h *Headscale) RegisterMachineFromAuthCallback(
)
if err == nil {
h.registrationCache.Delete(machineKeyStr)
h.registrationCache.Delete(nodeKeyStr)
}
return machine, err