[Bug 291763] pfctl: loginterface packet counts for pass/block swapped
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 Dec 2025 21:11:29 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291763
--- Comment #1 from eborisch+FreeBSD@gmail.com ---
Reverting a3f71765
(https://cgit.freebsd.org/src/commit/?h=releng/15.0&id=a3f71765)
seems to fix it; but I'm unaware of the background / ill effects of reverting
that commit, but pf_status (pf.h) still has pcounter[2][2][3] arrays.
Contents of a3f71765 for reference:
libpfctl: fix incorrect pcounters array size
The array is 2 x 2 x 2, not 2 x 2 x 3.
Sponsored by: Rubicon Communications, LLC ("Netgate")
MFC after: 2 weeks
Diffstat
-rw-r--r-- lib/libpfctl/libpfctl.c 2
-rw-r--r-- lib/libpfctl/libpfctl.h 2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c
index 076cfd3400e6..b42afc542273 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -325,7 +325,7 @@ pfctl_get_status(int dev)
_pfctl_get_status_counters(nvlist_get_nvlist(nvl, "scounters"),
&status->scounters);
- pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 3,
+ pf_nvuint_64_array(nvl, "pcounters", 2 * 2 * 2,
(uint64_t *)status->pcounters, NULL);
pf_nvuint_64_array(nvl, "bcounters", 2 * 2,
(uint64_t *)status->bcounters, NULL);
diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h
index 4e06981a79c7..bdb4bfae4be1 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -62,7 +62,7 @@ struct pfctl_status {
struct pfctl_status_counters lcounters;
struct pfctl_status_counters fcounters;
struct pfctl_status_counters scounters;
- uint64_t pcounters[2][2][3];
+ uint64_t pcounters[2][2][2];
uint64_t bcounters[2][2];
};
--
You are receiving this mail because:
You are the assignee for the bug.