HomeFreeBSD

bsnmpd: Return the correct uptime.

Description

bsnmpd: Return the correct uptime.

Do not assume that the kernel boot time is invariant. It is not. FreeBSD
uses the formula:
wall_time = boot_time + uptime
where uptime is monotinically increasing and boot_time is adjusted to
get the proper time of day. FreeBSD offers a way to retrieve the uptime
directly, so use that instead of trying to compute it by subtracting
boot_time from wall_time.

Sponsored by: Netflix
Reviewed by: cy@
Differential Revision: https://reviews.freebsd.org/D30114

Details

Provenance
impAuthored on May 5 2021, 9:11 PM
Differential Revision
D30114: bsnmpd: Return the correct uptime.
Parents
rG6c34dde83ee6: igmp: Avoid an out-of-bounds access when zeroing counters
Branches
Unknown
Tags
Unknown