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, May 21, 9:18 AM
Unknown Object (File)
Thu, May 21, 9:18 AM
Unknown Object (File)
Thu, May 21, 9:18 AM
Unknown Object (File)
Wed, May 20, 12:29 PM
Unknown Object (File)
Wed, May 20, 9:55 AM
Unknown Object (File)
Wed, May 20, 9:55 AM
Unknown Object (File)
Sun, May 17, 1:54 PM
Unknown Object (File)
Sun, May 17, 8:27 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