Wallclock vs monotonic time in v6 expiry times?

Chuck Swiger cswiger at mac.com
Tue Feb 19 19:51:45 UTC 2013


Hi--

On Feb 19, 2013, at 10:42 AM, Alex Yong wrote:
> I've been looking around in the IPv6 code recently and I noticed that
> time_second seems to be the clock of choice for calculating expiry times
> for prefixes, routers and addresses.  Is there any specific reason it uses
> wall clock time and not time_uptime as this makes more sense to me?

Sure.  Sequence #s, retry timers, etc do better if based off of wall clock time
than if based off of uptime because realtime persists in moving forward but
uptime gets reset if the host crashes/reboots.

RFC-793 discusses "Quiet Time" concept for TCP, but it applies elsewhere.

Regards,
-- 
-Chuck



More information about the freebsd-net mailing list