aboutsummaryrefslogtreecommitdiff
path: root/sys/net/pfvar.h
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-04-15 14:12:11 +0000
committerKristof Provost <kp@FreeBSD.org>2021-04-19 12:31:47 +0000
commit42ec75f83aa321fcea8d2eddc4e9099724f0669e (patch)
treecb2ed4204eef02f1724d5b6a98e7c95bf5b25160 /sys/net/pfvar.h
parent8bb0f1b87b80fd0a9c9dc388851cb609298d36ef (diff)
downloadsrc-42ec75f83aa321fcea8d2eddc4e9099724f0669e.tar.gz
src-42ec75f83aa321fcea8d2eddc4e9099724f0669e.zip
pf: Optionally attempt to preserve rule counter values across ruleset updates
Usually rule counters are reset to zero on every update of the ruleset. With keepcounters set pf will attempt to find matching rules between old and new rulesets and preserve the rule counters. MFC after: 4 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29780
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r--sys/net/pfvar.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index efb9a382511e..3a79a281f916 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -996,6 +996,7 @@ struct pf_kstatus {
uint32_t hostid;
char ifname[IFNAMSIZ];
uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH];
+ bool keep_counters;
};
struct pf_divert {
@@ -1304,6 +1305,8 @@ struct pfioc_iface {
#define DIOCSETIFFLAG _IOWR('D', 89, struct pfioc_iface)
#define DIOCCLRIFFLAG _IOWR('D', 90, struct pfioc_iface)
#define DIOCKILLSRCNODES _IOWR('D', 91, struct pfioc_src_node_kill)
+#define DIOCKEEPCOUNTERS _IOWR('D', 92, struct pfioc_nv)
+
struct pf_ifspeed_v0 {
char ifname[IFNAMSIZ];
u_int32_t baudrate;