Skip to content

TOTP code mismatch: better guidelines in code #1267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tlaurion
Copy link
Collaborator

@tlaurion tlaurion commented Jan 4, 2023

Fixes linuxboot/heads-wiki#103

@JonathonHall-Purism : comments?
Also note that we should maybe cover with one rock (two birds) #1266

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jan 4, 2023

GUI Results in:
2023-01-04-162845

Console output results in:
2023-01-04-163026

Then some issues resulting in "Alarm clock" as reported under https://dev.archive.openwrt.org/ticket/14541

Which if we removed -q option for ntpd would go forever:
2023-01-04-163827

Let's remember that network-init-recovery tried to do ntp sync with router, based on DNS provider (router) first, and then tries to talk to ntp.pool.org first resolving address through DNS, then talking to it through NTP. Through my setup (qemu under Qubes appvm) ntp (UDP) doesn't succeed).

@JonathonHall-Purism : we could document further on command line the process if needed for network-init-recovery:

  • First: address is attempted to be obtained dynamically through DHCP locally, etting DNS server from response
  • Second: NTP sync is attempted on DNS server provided by DCP response.
  • Third: if NTP against DNS server fails, ntp.pool.org is attempted to be resolved and then NTP sync is attempted on IP address (UDP). Might be firewalled.

Thoughts?

@JonathonHall-Purism
Copy link
Collaborator

Regarding the immediate change, it is certainly an improvement, I've had to help people a handful of times to deal with RTC resets.

I don't think we need to spell out everything network-init-recovery does. I think it'd be pretty verbose and would probably distract from the more important information.

Re: #1266, per discussion in Matrix channel, if we can avoid the problem entirely (not increment the counter when the HOTP dongle isn't present), I think that'd be much better than more gotchas and warnings.

@tlaurion
Copy link
Collaborator Author

tlaurion commented Jan 5, 2023

#1266 needs more thought. To be dealt individually.

@JonathonHall-Purism merge this one?

@JonathonHall-Purism
Copy link
Collaborator

Yep merge it, thanks 🚢

@tlaurion tlaurion merged commit 395de88 into linuxboot:master Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTC clock drifting problems - manual/automatic correction guides
2 participants