aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKajetan Staszkiewicz <vegeta@tuxpowered.net>2023-04-13 16:12:59 +0000
committerKristof Provost <kp@FreeBSD.org>2023-04-14 07:04:06 +0000
commit39282ef356db25879660427de8607716a8439077 (patch)
tree00bb2b4cccb6984ddd9deb04a572dc89ad89b558 /lib
parent8935a3993219be76c7ea03e9ad4509657d08af6c (diff)
pf: backport OpenBSD syntax of "scrub" option for "match" and "pass" rules
Introduce the OpenBSD syntax of "scrub" option for "match" and "pass" rules and the "set reassemble" flag. The patch is backward-compatible, pf.conf can be still written in FreeBSD-style. Obtained from: OpenBSD MFC after: never Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D38025
Diffstat (limited to 'lib')
-rw-r--r--lib/libpfctl/libpfctl.c1
-rw-r--r--lib/libpfctl/libpfctl.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index f34f83cfb57c..c75f9ab12889 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -225,6 +225,7 @@ pfctl_get_status(int dev)
status->states = nvlist_get_number(nvl, "states");
status->src_nodes = nvlist_get_number(nvl, "src_nodes");
status->syncookies_active = nvlist_get_bool(nvl, "syncookies_active");
+ status->reass = nvlist_get_number(nvl, "reass");
strlcpy(status->ifname, nvlist_get_string(nvl, "ifname"),
IFNAMSIZ);
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 684e73c1815d..1a07b74dc10f 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -58,6 +58,7 @@ struct pfctl_status {
char ifname[IFNAMSIZ];
uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH];
bool syncookies_active;
+ uint32_t reass;
struct pfctl_status_counters counters;
struct pfctl_status_counters lcounters;
@@ -347,7 +348,7 @@ struct pfctl_state {
uint32_t creation;
uint32_t expire;
uint32_t pfsync_time;
- uint8_t state_flags;
+ uint16_t state_flags;
uint32_t sync_flags;
};