git: 64bfb82f1741 - main - pfctl: print once shot rule expiration time
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 Sep 2025 12:41:47 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=64bfb82f17417660f3d1a2d10b381b293b780b21 commit 64bfb82f17417660f3d1a2d10b381b293b780b21 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-08-28 15:50:54 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-09-25 12:41:11 +0000 pfctl: print once shot rule expiration time We already track this in the kernel and pass it to userspace, we may as well show users. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index edbc924341e0..f04bc93436d8 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1292,8 +1292,12 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer } } - if (r->rule_flag & PFRULE_EXPIRED) + if (r->rule_flag & PFRULE_EXPIRED) { printf(" # expired"); + + if (r->exptime != 0) + printf(" %s", ctime(&r->exptime)); + } } void