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
F156947391: D50722.diff
Sun, May 17, 1:54 PM
F156916996: D50722.id156639.diff
Sun, May 17, 8:27 AM
F156906993: D50722.id.diff
Sun, May 17, 6:30 AM
Unknown Object (File)
Sat, May 16, 4:19 AM
Unknown Object (File)
Sat, May 16, 2:26 AM
Unknown Object (File)
Sat, May 16, 2:26 AM
Unknown Object (File)
Sat, May 16, 2:25 AM
Unknown Object (File)
Wed, May 13, 5:48 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