wpa_supplicant, eloop_register_timeout() and ntpdate

Johannes Berg johannes
Wed Nov 13 23:42:17 PST 2013

On Thu, 2013-11-14 at 08:08 +0100, Holger Schurig wrote:

>  int os_get_time(struct os_time *t)

Well, as I've discussed in my patch, changing os_get_time() is a bad
idea since some places require wall clock.

> The rationale is that I wanted to use CLOCK_MONOTONIC_RAW that is
> protected against "date", "ntpdate" and "timeadj". But it's only in
> Linux since kernel 2.6.28 and Linux specific, so I kept the original
> code as a fallback. You need of course to modify the Makefiles also so
> that the binaries got linked with librt.
> My "man clock_gettime" doesn't document CLOCK_BOOTTIME. And it says

Mine does :-)
manpages v3.54

> that CLOCK_MONOTONIC *is* affected by ntp, see
> http://manpages.debian.net/cgi-bin/man.cgi?query=clock_gettime.

As I understand it, this is referring to adjtime() calls, not
settimeofday()/clock_settime(). I think that's fine, I think, since
that's used when our clock was drifting and is now going slightly
faster/slower than the 'raw' hardware clock to make up for it.


More information about the Hostap mailing list