diff options
| author | Kristof Provost <kp@FreeBSD.org> | 2025-08-28 15:50:54 +0000 |
|---|---|---|
| committer | Kristof Provost <kp@FreeBSD.org> | 2025-09-25 12:41:11 +0000 |
| commit | 64bfb82f17417660f3d1a2d10b381b293b780b21 (patch) | |
| tree | 830afef452d92399cb82cae8edfd41c7cd1bbc09 | |
| parent | 2c53e251601c1fcd558f42a16f6030ba75b7e8df (diff) | |
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")
| -rw-r--r-- | sbin/pfctl/pfctl_parser.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
