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)
Sat, Dec 13, 10:54 PM
Unknown Object (File)
Sat, Dec 13, 4:02 PM
Unknown Object (File)
Fri, Dec 12, 3:06 AM
Unknown Object (File)
Fri, Dec 12, 2:21 AM
Unknown Object (File)
Thu, Dec 11, 5:25 PM
Unknown Object (File)
Mon, Dec 8, 11:21 PM
Unknown Object (File)
Fri, Dec 5, 5:20 PM
Unknown Object (File)
Thu, Nov 20, 3:12 AM

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 64679
Build 61563: arc lint + arc unit