mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00: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:
parent
fca33aacbe
commit
e85562268d
2
api.go
2
api.go
@ -348,7 +348,7 @@ func (h *Headscale) RegistrationHandler(
|
|||||||
|
|
||||||
machine.Expiry = &time.Time{}
|
machine.Expiry = &time.Time{}
|
||||||
h.registrationCache.Set(
|
h.registrationCache.Set(
|
||||||
machineKeyStr,
|
NodePublicKeyStripPrefix(registerRequest.NodeKey),
|
||||||
*machine,
|
*machine,
|
||||||
registerCacheExpiration,
|
registerCacheExpiration,
|
||||||
)
|
)
|
||||||
|
@ -803,7 +803,7 @@ func (h *Headscale) RegisterMachineFromAuthCallback(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
h.registrationCache.Delete(machineKeyStr)
|
h.registrationCache.Delete(nodeKeyStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
return machine, err
|
return machine, err
|
||||||
|
Loading…
Reference in New Issue
Block a user