diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2022-11-09 23:00:01 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2022-11-09 23:00:01 +0000 |
commit | 5e114c420ed7c082cac33a3347615c988cc3c18d (patch) | |
tree | c822c7e272dee8df5c10601e305a0c462a68142e /sbin | |
parent | c476426cdb51f58d68eb6aea228356edc3d31619 (diff) |
simplify expiration of 'once' rules.
let packet to mark 'once' rule as expired. The rule
will be removed by pfctl(8) when rules are updated.
OK kn@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 6f39ad72384..07ed75ceaea 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.346 2021/02/01 00:31:04 dlg Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.347 2022/11/09 23:00:00 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1148,6 +1148,9 @@ print_rule(struct pf_rule *r, const char *anchor_call, int opts) printf(" "); print_pool(&r->route, 0, 0, r->af, PF_POOL_ROUTE, verbose); } + + if (r->rule_flag & PFRULE_EXPIRED) + printf(" # expired"); } void |