summaryrefslogtreecommitdiff
path: root/sys/net/pipex.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2023-09-16 09:33:29 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2023-09-16 09:33:29 +0000
commitfff317a1d2654248f137b1b92993cc737921b110 (patch)
tree4d1cb84a19d51934c530fd92b6321ff3519eb995 /sys/net/pipex.c
parent817d1e1b3d749f30a8a76eba5823137fb9695bde (diff)
Allow counters_read(9) to take an optional scratch buffer.
Using a scratch buffer makes it possible to take a consistent snapshot of per-CPU counters without having to allocate memory. Makes ddb(4) show uvmexp command work in OOM situations. ok kn@, mvs@, cheloha@
Diffstat (limited to 'sys/net/pipex.c')
-rw-r--r--sys/net/pipex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pipex.c b/sys/net/pipex.c
index 3a1a524c669..71bd7bbec25 100644
--- a/sys/net/pipex.c
+++ b/sys/net/pipex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pipex.c,v 1.148 2022/08/30 19:42:29 bluhm Exp $ */
+/* $OpenBSD: pipex.c,v 1.149 2023/09/16 09:33:27 mpi Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -558,7 +558,7 @@ pipex_export_session_stats(struct pipex_session *session,
memset(stats, 0, sizeof(*stats));
- counters_read(session->stat_counters, counters, pxc_ncounters);
+ counters_read(session->stat_counters, counters, pxc_ncounters, NULL);
stats->ipackets = counters[pxc_ipackets];
stats->ierrors = counters[pxc_ierrors];
stats->ibytes = counters[pxc_ibytes];