aboutsummaryrefslogtreecommitdiff
path: root/lib/libpfctl
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-09-29 12:45:03 +0000
committerKristof Provost <kp@FreeBSD.org>2022-10-05 15:52:27 +0000
commit1d090028d3037adffac6fde004b2ad035921bb49 (patch)
tree7b4596c9c03dd2c16cb4fac814730257d11cee9f /lib/libpfctl
parent1fc839f48921919dea386966e0ce4f20c26dcecf (diff)
downloadsrc-1d090028d3037adffac6fde004b2ad035921bb49.tar.gz
src-1d090028d3037adffac6fde004b2ad035921bb49.zip
pf: use time_to for timestamps
Use time_t rather than uint32_t to represent the timestamps. That means we have 64 bits rather than 32 on all platforms except i386, avoiding the Y2K38 issues on most platforms. Reviewed by: Zhenlei Huang Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36837
Diffstat (limited to 'lib/libpfctl')
-rw-r--r--lib/libpfctl/libpfctl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 261913e1873d..faccabd227a3 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -102,7 +102,7 @@ struct pfctl_eth_rule {
uint64_t evaluations;
uint64_t packets[2];
uint64_t bytes[2];
- uint32_t last_active_timestamp;
+ time_t last_active_timestamp;
/* Action */
char qname[PF_QNAME_SIZE];
@@ -175,7 +175,7 @@ struct pfctl_rule {
uint64_t evaluations;
uint64_t packets[2];
uint64_t bytes[2];
- uint32_t last_active_timestamp;
+ time_t last_active_timestamp;
struct pfi_kif *kif;
struct pfctl_anchor *anchor;