diff --git a/protocol_common.go b/protocol_common.go index 998b2026..49c9138a 100644 --- a/protocol_common.go +++ b/protocol_common.go @@ -100,11 +100,9 @@ func (h *Headscale) handleRegisterCommon( registerRequest tailcfg.RegisterRequest, machineKey key.MachinePublic, ) { - now := time.Now().UTC() machine, err := h.GetMachineByAnyNodeKey(registerRequest.NodeKey, registerRequest.OldNodeKey) if errors.Is(err, gorm.ErrRecordNotFound) { - // If the machine has AuthKey set, handle registration via PreAuthKeys if registerRequest.Auth.AuthKey != "" { h.handleAuthKeyCommon(writer, req, registerRequest, machineKey) @@ -242,7 +240,6 @@ func (h *Headscale) handleRegisterCommon( return } - } // handleAuthKeyCommon contains the logic to manage auth key client registration @@ -676,7 +673,6 @@ func (h *Headscale) handleMachineRefreshKeyCommon( Str("old_node_key", registerRequest.OldNodeKey.ShortString()). Str("machine", machine.Hostname). Msg("Machine successfully refreshed") - } func (h *Headscale) handleMachineExpiredCommon( diff --git a/protocol_legacy.go b/protocol_legacy.go index b943dc9f..4e75d127 100644 --- a/protocol_legacy.go +++ b/protocol_legacy.go @@ -55,5 +55,4 @@ func (h *Headscale) RegistrationHandler( } h.handleRegisterCommon(writer, req, registerRequest, machineKey) - }