HomeFreeBSD

pf: use time_uptime rather than time_seconds

Description

pf: use time_uptime rather than time_seconds

Use time_uptime as value for when pf was enabled instead of time_second. Since
time_second changes depending on the wall- clock time, time_second is not a
reliable source for the status. We can even end up with a negative time delta.
Thus, use the monotonically growing time_uptime and compute the correct wall
clock time when userspace requests the status.

ok bluhm@ mikeb@

Reviewed by: imp
Obtained from: OpenBSD, patrick <patrick@openbsd.org>, 63b24bda99
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D50722

Details

Provenance
kpAuthored on May 28 2025, 12:18 PM
Reviewer
imp
Differential Revision
D50722: pf: use time_uptime rather than time_seconds
Parents
rG5a54d768e1f9: scmi: Add sysctl transport properties
Branches
Unknown
Tags
Unknown