Page MenuHomeFreeBSD

pf: use time_uptime rather than time_seconds
ClosedPublic

Authored by kp on Jun 6 2025, 2:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 16, 8:45 PM
Unknown Object (File)
Mon, Oct 13, 9:36 AM
Unknown Object (File)
Thu, Oct 9, 7:41 AM
Unknown Object (File)
Wed, Sep 24, 3:14 AM
Unknown Object (File)
Tue, Sep 23, 11:20 PM
Unknown Object (File)
Mon, Sep 22, 4:30 PM
Unknown Object (File)
Sep 17 2025, 6:58 AM
Unknown Object (File)
Sep 14 2025, 3:13 PM

Details

Summary

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@

Obtained from: OpenBSD, patrick <patrick@openbsd.org>, 63b24bda99
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable