summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/pfctl/pfctl_qstats.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/pfctl/pfctl_qstats.c')
-rw-r--r--freebsd/sbin/pfctl/pfctl_qstats.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/freebsd/sbin/pfctl/pfctl_qstats.c b/freebsd/sbin/pfctl/pfctl_qstats.c
index dda3a494..a5beb88a 100644
--- a/freebsd/sbin/pfctl/pfctl_qstats.c
+++ b/freebsd/sbin/pfctl/pfctl_qstats.c
@@ -22,12 +22,14 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#ifdef __rtems__
#include <machine/rtems-bsd-program.h>
#endif /* __rtems__ */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#define PFIOC_USE_LATEST
+
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
@@ -165,6 +167,7 @@ pfctl_update_qstats(int dev, struct pf_altq_node **root)
memset(&pa, 0, sizeof(pa));
memset(&pq, 0, sizeof(pq));
memset(&qstats, 0, sizeof(qstats));
+ pa.version = PFIOC_ALTQ_VERSION;
if (ioctl(dev, DIOCGETALTQS, &pa)) {
warn("DIOCGETALTQS");
return (-1);
@@ -194,6 +197,7 @@ pfctl_update_qstats(int dev, struct pf_altq_node **root)
pq.ticket = pa.ticket;
pq.buf = &qstats.data;
pq.nbytes = sizeof(qstats.data);
+ pq.version = altq_stats_version(pa.altq.scheduler);
if (ioctl(dev, DIOCGETQSTATS, &pq)) {
warn("DIOCGETQSTATS");
return (-1);