CVSROOT:        /cvs
Module name:    src
Changes by:     chel...@cvs.openbsd.org 2020/05/14 18:56:03

Modified files:
        sbin/pfctl     : pfctl_parser.c 
        usr.sbin/snmpd : mib.c 
        usr.bin/systat : pf.c 

Log message:
pf(4): use CLOCK_BOOTTIME to get time_uptime(9) in userspace

In pf(4), the pf_status.since timestamp is set with time_uptime(9).
This is a low-res snapshot of nanouptime(9).  nanouptime(9) is used to
implement CLOCK_BOOTTIME for clock_gettime(2).  It is not used to
implement CLOCK_UPTIME, though.  The names are misleading.

Switch to CLOCK_BOOTTIME in places in userspace where we use
pf_status.since so we are working with the right clock.

Technically CLOCK_MONOTONIC is equivalent, but we shouldn't use that
here.  CLOCK_MONOTONIC is not necessarily the "time since boot": the
standard says its absolute value is meaningless.

ok patrick@ bluhm@

Reply via email to