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)
Wed, Sep 17, 6:58 AM
Unknown Object (File)
Sun, Sep 14, 3:13 PM
Unknown Object (File)
Sat, Sep 13, 10:16 PM
Unknown Object (File)
Tue, Sep 9, 4:03 AM
Unknown Object (File)
Thu, Sep 4, 1:05 PM
Unknown Object (File)
Fri, Aug 29, 12:05 AM
Unknown Object (File)
Aug 20 2025, 2:27 PM
Unknown Object (File)
Aug 8 2025, 2:29 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 Not Applicable
Unit
Tests Not Applicable