wpa_supplicant, eloop_register_timeout() and ntpdate

Johannes Berg johannes
Wed Nov 13 07:22:48 PST 2013

On Wed, 2013-11-13 at 14:13 +0100, Holger Schurig wrote:

> I noticed that wpa_supplicant doesn't really like it when the system
> time changes while it is running.
> Any idea on how wpa_supplicant could be hardened against time changes?

Interesting! Yeah, this is pretty much completely broken - anything
trying to do relative time calculations shouldn't be using
gettimeofday() but rather clock_gettime(CLOCK_BOOTTIME) [linux-only] or
clock_gettime(CLOCK_MONOTONIC) [more widely supported I think -
specified but not required in POSIX].

Trying to change this though seems to be a really big thing though,
since there are some users of os_get_time() that require wall time
(certification checking etc.) and others that want relative time...

Well - I guess something like this:


More information about the Hostap mailing list